简体   繁体   中英

Android webview save images to device

I have a webapp with some quite heavy images and they took a while to load

Is possible to save images from a website to an android device and then load them in a webview?

Thanks

Is it possible to save images from a website to an android device?

Yes, using file I/O or a sqllitedb -databae

then load them in a webview?

This can be achieved with following method:

  • public void loadData (String data, String mimeType, String encoding)

An example how to display an image using loadData:

Hope this helps, if not comment below

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