Gitlab@Informatics

Skip to content
Snippets Groups Projects
Commit fe0b4ce8 authored by 62160052's avatar 62160052
Browse files

Added let scope function

parent 0943099f
No related branches found
No related tags found
No related merge requests found
package com.example.android.marsphotos.overview
import android.widget.ImageView
import androidx.core.net.toUri
import androidx.databinding.BindingAdapter
import coil.load
@BindingAdapter("imageUrl")
fun bindImage(imgView: ImageView, imgUrl: String?) {
imgUrl?.let {
val imgUri = imgUrl.toUri().buildUpon().scheme("https").build()
imgView.load(imgUri)
}
}
class BindingAdapters {
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment