title: "ScaleType:FIT_XY" doesnt stretch the images in the Gallery
body: <p>I have a gallery in landscape mode with a lot of images with an imageadapter. I want that the images stretch to the whole screen Horizontally, and keep the aspect ratio and stretch as much as needed vertically..<br>
  I tried to use FIT_XY, it doesnt fit Horizontally, but it doesnt keep the ratio vertically ( the images become crushed)<br>
  How can I do this? Here is the custom image adapter:  </p>
  
  <pre><code>    public class ImageAdapter extends BaseAdapter {
  int mGalleryItemBackground;
  int counter = 0;
  
  private final Context mContext;
  
  public String[] mImageIds;
  
  public ImageAdapter(Context c) {
      mContext = c;
      TypedArray a = c.obtainStyledAttributes(R.styleable.Gallery1);
      mGalleryItemBackground = a.getResourceId(R.styleable.Gallery1_android_galleryItemBackground, 0);
      a.recycle();
  }
  
  public void insert(String string) {
      mImageIds[counter] = string;
      counter++;
  }
  
  @Override
  public int getCount() {
      return mImageIds.length;
  }
  
  @Override
  public Object getItem(int position) {
      return position;
  }
  
  @Override
  public long getItemId(int position) {
      return position;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
      ImageView i = new ImageView(mContext);
  
      i.setImageBitmap(BitmapFactory.decodeFile(mImageIds[position]));
      i.setLayoutParams(new Gallery.LayoutParams(WindowManager.LayoutParams.FILL_PARENT, WindowManager.LayoutParams.FILL_PARENT));
      i.setScaleType(ImageView.ScaleType.MATRIX);
      i.setBackgroundResource(mGalleryItemBackground);
  
      return i;
  }
  </code></pre>
  
  <p>}</p>