This is what I've tried
Glide
.with(context)
.load(imgUrl)
.listener(object : RequestListener<Drawable>{
override fun onLoadFailed(e: GlideException?, model: Any?, target: Target<Drawable>?, isFirstResource: Boolean): Boolean {
return false
}
override fun onResourceReady(resource: Drawable?, model: Any?, target: Target<Drawable>?, dataSource: DataSource?, isFirstResource: Boolean): Boolean {
return false
}
})
.into(holder.image)
First error on object
:
Object is not abstract and does not implement abstract member public abstract fun onResourceReady(resource: Drawable!, model: Any!, target: Target!, dataSource: DataSource!, isFirstResource: Boolean): Boolean defined in com.bumptech.glide.request.RequestListener
Second error on Drawable
:
No type arguments expected for annotation class Target
Third error on second override
:
'onResourceReady' overrides nothing
What is wrong here? Or are there any other solutions??