Closed 25RBazookas closed 7 years ago
Sorry didn't saw #1
The image wont be shown with this code. If I leave .Listener(new MyImageListener() { Listener = _listener, MyImageView = this })
everything works fine. But if I place this code in my request builder I don't see my image. Can you help me?
If i do (imageView as ImageView_Base).SetImageBitmap((bitmapDrawable as GlideBitmapDrawable).Bitmap);
in my onresourceready it won't work either.
builder.Listener(new MyImageListener() { Listener = _listener, MyImageView = this }).Into(this);
public class MyImageListener : Java.Lang.Object, IRequestListener
{
public MyImageCallback Listener { get; set; }
public ImageView_Base MyImageView { get; set; }
public bool OnException(Java.Lang.Exception p0, Java.Lang.Object p1, ITarget p2, bool p3)
{
Listener?.OnError();
return false;
}
public bool OnResourceReady(Java.Lang.Object bitmapDrawable, Java.Lang.Object path, ITarget imageView, bool p3, bool p4)
{
MyImageView.SetImageBitmap((bitmapDrawable as GlideBitmapDrawable).Bitmap);
Listener?.OnSuccess();
return true;
}
}
if i use this MyImageView.SetImageDrawable(bitmapDrawable as GlideBitmapDrawable); shows the image
the images is shown
Hello I can't make a SimpleTarget callback to know when my image is loaded. Is this also binded in this project?
I can make a class that inherits from SimpleTarget but I'm unable to find the onResourceReady().
Callbacks described here: Glide Callbacks