开发者

Saving Drawable to Disk and retrieving - Android

开发者 https://www.devze.com 2022-12-10 10:48 出处:网络
how would I save a drawable to the SDcard (custom folder) and later 开发者_Go百科retrieve it assuming im keeping track of the path of the saved item.

how would I save a drawable to the SDcard (custom folder) and later 开发者_Go百科retrieve it assuming im keeping track of the path of the saved item.

Thanks, Faisal


I assume you want to download images from Internet?

You can use FileOutputStream to save the images, and you can use File.mkdirs() to create custom directory on the SD Card.

If you want to load the image later, you can use BitmapFactory.decodeFile(String pathName).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号