2010-08-05 41 views

回答

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; 

} 
相關問題