beraybentesen / glide-xamarin-android

Glide Xamarin Binding
https://www.nuget.org/packages/Glide.Xamarin/
61 stars 14 forks source link

Placeholder option is not available #19

Open corjohnson opened 6 years ago

corjohnson commented 6 years ago

When I try to use the placeholder function in glide it can't find the class...

Example:

Glide
    .With(Context)
    .Load(http://static.boredpanda.com/blog/wp-content/uploads/2014/12/owl-photography-2__880.jpg)
    .Placeholder(Resource.Drawable.image_ph)
    .Into(MyImageView);

This was working fine in v 3.8.0, is there any way that you can get the placeholder function working again?

Let me know if you can't repro it and I can try to get more info.

Thanks.

stefan89 commented 6 years ago

It seems you can set the placeholder like:

            var requestOptions = new RequestOptions ();
            requestOptions.Placeholder (Resource.Drawable.my_placeholder);
            requestOptions.CenterCrop ();
            requestOptions.Error (Resource.Drawable.my_placeholder);

            Glide.With (this).Load (ImageUrl).Apply (requestOptions).Into (imageView);
corjohnson commented 6 years ago

@stefan89 Thank you!