tags:

views:

32

answers:

2

Hey guys,

How would I use ImageGallery to display images I have saved in a particular location on the sd card?

A: 

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;

}
Jorgesys