简体   繁体   中英

Android: I created a bitmap from canvas and save it to “sdcard/folder/subfolder” but I couldn't decode it to a image view

I've created a bitmap from canvas. Save it to my "/sdcard/folder/subfolder/file.png"

I want to get this png file into imageview after saving it. I tried this by using BitmapFactory.decodeFile("/sdcard/folder/subfolder/file.png"); method. But it returned nothing. There is no image on imageview.

Do you have any idea?

尝试使用

    String filePath = Environment.getExternalStorageDirectory()+"/folder/subfolder/file.png";//or "folder/subfolder.."

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