Answers for "coil library kotlin"

0

coil library kotlin

//Add Coil(Coroutine Image Loader ) Lib in the gradle - app
    implementation "io.coil-kt:coil:0.9.5"
    
    
  //use BindingAdapter to load the image using Coil's load(url) method
  
  @BindingAdapter("loadImageFromCoil")
fun ImageView.getImageFromCoil(imageUrl:String?){
    imageUrl?.let {

      val uri =  it.toUri().buildUpon().scheme("https").build()

        //Glide.with(this.context).load(uri)
       load(uri)
    }


}
Posted by: Guest on May-05-2021

Browse Popular Code Answers by Language