Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the most efficient way to load my stored JPG file into the ImageView?

I have valid JPG files and now I want to load them into a layout containing an ImageView. I have code to findViewId(R.id.myimage). I followed some sample code using File but it did not work. The file is stored at /data/data/com.myapp/files/someimage.jpg.

What is the easiest and efficient way to load and display?

like image 622
mobibob Avatar asked Sep 10 '10 04:09

mobibob


1 Answers

((ImageView)view).setImageBitmap(BitmapFactory.decodeFile("/data/data/com.myapp/files/someimage.jpg"));

With the few info you give that's all I can do.

like image 190
Kevin Gaudin Avatar answered Oct 14 '22 23:10

Kevin Gaudin