You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The low res image does not load instead high res image load. placeholderMemoryCacheKey is not taking effect as it should.
It ONLY WORKS if I does not supply the mImageLoader in load method. What is the issue with my Imageloader?
setContentView(R.layout.image_view)
val container = findViewById<ImageView>(R.id.image)
val low = "https://i.postimg.cc/jjybNY2y/i01-jeremy-thomas-o6n9rv2rzx8-unsplash.jpg"
val high = "https://i.postimg.cc/5yVjvmf2/jeremy-thomas-O6-N9-RV2rz-X8-unsplash.jpg"
container.load(low, (applicationContext as MyApplication).mImageLoader) {
placeholder(R.drawable.ic_fastfood)
listener(onSuccess = { request, result ->
container.load(high) { // load high resolution image
crossfade(true)
placeholderMemoryCacheKey(result.memoryCacheKey)
}
}, onError = { _, _ ->
container.loadUrl(high)
})
}
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The low res image does not load instead high res image load. placeholderMemoryCacheKey is not taking effect as it should.
It ONLY WORKS if I does not supply the mImageLoader in load method. What is the issue with my Imageloader?
ImageLoadeer
Beta Was this translation helpful? Give feedback.
All reactions