Skip to content

streinhard/glide-xamarin-android

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Glide

Glide Xamarin Binding

Glide is a fast and efficient open source media management and image loading framework for Android that wraps media decoding, memory and disk caching, and resource pooling into a simple and easy to use interface.

Android resource: https://github.com/bumptech/glide

Version : 3.7.0

Download : Available on Nuget Gallery ( https://www.nuget.org/packages/Glide.Xamarin/ )

How do I use Glide?

Simple use cases :

// Default :
Glide.With(this).Load("Url").Into(propertyPrimaryImageView);

// Placeholder :
Glide.With(this).Load("Url")
			     .Placeholder(Resource.Drawable.placeholder)
			     .Into(propertyPrimaryImageView);

// Thumbnail & DontAnimate			     
Glide.With(this).Load("Url")
			     .Placeholder(Resource.Drawable.placeholder)
			     .Thumbnail(0.1f)
			     .DontAnimate()
			     .Into(propertyPrimaryImageView);			     

// SkipMemoryCache & DiskCacheStrategy
Glide.With(this).Load("Url")
				 .Placeholder(Resource.Drawable.placeholder)
				 .SkipMemoryCache(true)
				 .DiskCacheStrategy(DiskCacheStrategy.All)
			     .Into(propertyPrimaryImageView);

Using in RecyclerView | ListView Adapter :

// Placeholder : 
Glide.With(context).Load("Url")
				 .Placeholder(Resource.Drawable.placeholder)
				 .Into(viewHolder.propertyImageView);

Using Listener :

https://developer.xamarin.com/guides/android/advanced_topics/java_integration_overview/android_callable_wrappers/

Gif support :

Glide.With(context).Load("GifUrl")
					 .Placeholder(Resource.Drawable.placeholder)
				     .DiskCacheStrategy(DiskCacheStrategy.Source)
					 .Into(viewHolder.propertyImageView);

Fast Loading from Cache :

alt tag

Combine Gif with Image

alt tag

Author

Beray Bentesen - @BerayBentesen on Twitter

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%