Tuesday 10 November 2020

Glide

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.

Glide supports fetching, decoding, and displaying video stills, images, and animated GIFs. 

Glide includes a flexible API that allows developers to plug in to almost any network stack. By default Glide uses a custom HttpUrlConnection based stack, but also includes utility libraries plug in to Google's Volley project or Square's OkHttp library instead.

Glide's primary focus is on making scrolling any kind of a list of images as smooth and fast as possible, but Glide is also effective for almost any case where you need to fetch, resize, and display a remote image.

glidex.forms

A library containing a Xamarin.Forms IImageViewHandler to speed up images on Android. Based on Glide. Just add Android.Glide.Forms.Init(this); after Xamarin.Forms.Forms.Init();




Google recommends Glide for simplifying the complexity of managing Android.Graphics.Bitmap within your apps.

glidex.forms is small library we can use to improve Xamarin.Forms image performance on Android by taking a dependency on Glide. 

How do I use glidex.forms?

To set this library up in your existing project, merely:

  • Add the glidex.forms NuGet package
  • Add this one liner after your app's Forms.Init call:
Xamarin.Forms.Forms.Init (this, bundle);
//This forces the custom renderers to be used
Android.Glide.Forms.Init (this);
LoadApplication (new App ());

How do I know my app is using Glide?

On first use, you may want to enable debug logging:

Android.Glide.Forms.Init (this, debug: true);

glidex.forms will print out log messages in your device log as to what is happening under the hood.

If you want to customize how Glide is used in your app, currently your option is to implement your own IImageViewHandler. See the GlideExtensions class for details.

Youtube GUIDE



Github LINK 

No comments:

Post a Comment

All About .NET MAUI

  What’s .NET MAUI? .NET MAUI (.NET Multi-platform App UI) is a framework for building modern, multi-platform, natively compiled iOS, Androi...

Ads2