Kishore
Kishore

Reputation: 2051

how to display images stored in application directory

how to display images stored in "/data/data/com.package/images/" directory in a GridView.

Upvotes: 0

Views: 1478

Answers (1)

mudit
mudit

Reputation: 25536

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

Upvotes: 1

Related Questions