Eric Martori
08/22/2019, 3:43 PMgildor
08/22/2019, 3:44 PMCasey Brooks
08/22/2019, 3:45 PMjw
08/22/2019, 3:45 PMAlejandro Rios
08/22/2019, 3:46 PMCoil-kt
, looks promisinggildor
08/22/2019, 3:47 PMEric Martori
08/22/2019, 3:58 PMcoil
so will definitely check that one out.pavi2410
08/22/2019, 4:38 PMloadAny
in Coil. They seem useless to me.
Like the example they presented
data class Item( val id: Int, val imageUrl: String, val price: Int, val weight: Double )
class ItemMapper : Mapper<Item, HttpUrl> {
override fun map(data: Item): HttpUrl = HttpUrl.get(data.imageUrl)
}
ImageView.loadAny(item)
could be simply written as
ImageView.load(item.imageUrl)
I don't understand why they convert the imageUrl
to HttpUrl
object. Am I missing something?gildor
08/23/2019, 12:43 AMfun ImageLoader.load(item: Item) = load(item.imageUrl)
And if you really want to abstract image loading details, better than abstract togethether with image loading library, if it's really necessaryjw
08/23/2019, 1:09 AM