How would I use ImageGallery to display imag开发者_开发问答es I have saved in a particular location on the sd card?
This should help: http://androidsamples.blogspot.com/2009/06/how-to-display-thumbnails-of-images.html
several ways to to do this, for example
//Using an array with the names of your stored pics (myPics)
public View getView(final int position, View convertView, ViewGroup parent) {
ImageView myImageView = new ImageView(mContext);
if (convertView != null)
myImageView = (ImageView) convertView;
else
myImageView = new ImageView(mContext);
Bitmap bitmapImage = BitmapFactory.decodeFile("/sdcard/myTempFolfer/" + myPics(position));
BitmapDrawable drawableImage = new BitmapDrawable(bitmapImage );
myImageView.setImageDrawable(drawableImage );
return myImageView;
}
精彩评论