开发者

how to display images stored in application directory

how to display images stored in "/data/data/c开发者_运维百科om.package/images/" directory in a GridView.


Step 1) Create a bitmap drawable from the file:

BitmapDrawable d = BitmapDrawable.createFromPath("path");

Step 2) set this drawable on the image view of the corresponding grid item.

ImageView iv = new ImageView(this);
iv.setImageDrawable(drawable);

On how to set imageview in grid view, please refer to this link:

http://developer.android.com/guide/tutorials/views/hello-gridview.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜