Skip to content

Commit

Permalink
Merge pull request #23 from hotwired/coil-images
Browse files Browse the repository at this point in the history
Switch to Coil to load demo app images
  • Loading branch information
jayohms authored Mar 21, 2024
2 parents ae366f9 + 699b1df commit 3172ece
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")

// Images
implementation("com.github.bumptech.glide:glide:4.15.1")
implementation("io.coil-kt:coil:2.6.0")

implementation(project(":core"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import com.bumptech.glide.Glide
import coil.load
import dev.hotwire.core.navigation.fragments.HotwireFragment
import dev.hotwire.core.turbo.nav.HotwireDestination
import dev.hotwire.core.turbo.util.displayBackButtonAsCloseIcon
Expand All @@ -28,8 +28,6 @@ class ImageViewerFragment : HotwireFragment() {
}

private fun loadImage(view: View) {
view.findViewById<ImageView>(R.id.image_view)?.let {
Glide.with(this).load(location).into(it)
}
view.findViewById<ImageView>(R.id.image_view)?.load(location)
}
}

0 comments on commit 3172ece

Please sign in to comment.