我如何使用ImageGallery显示我保存在SD卡上特定位置的图像?
答案 0 :(得分:0)
答案 1 :(得分:0)
有几种方法可以做到这一点,例如
//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;
}