Code example for Gallery.LayoutParams

0
             
           // i.setImageResource(mThumbIds[position]); 
          
            i.setAdjustViewBounds(true);
            i.setLayoutParams(new Gallery.LayoutParams(
                    LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
 //           i.setBackgroundResource(R.drawable.picture_frame); 
            return i;
        } 
  
        private Context mContext;
  
    } 
  
  
  
}