简体   繁体   中英

Android glide load bitmap

In my app, i have an image view, the image content I get from the server is in the format of base64 encoded string. I store it locally and decode it to bitmap. This bitmap is loaded to the image view. This makes the app to scroll slow. Now I found the reason behind that is no caching is done for the bitmap. One recommended a solution to use glide. But I did not find any method to load bitmap using glide. I just found the following method

Glide.with(context).load("http://goo.gl/gEgYUd").into(pollWebView);

can we load bitmap using glide?

您可以将File传递给Glide。

Glide.with(context).load(new File("your/file/name.jpg")).into(pollWebView);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM