title: Image in ImageView is stretched - Android
body: <p>I am trying to make a small image appear on my screen.  I want it to be a small square.  With the below code, it shows up as a long flat rectangle.  I have attached a picture of what it looks like below.</p>
  
  <p><strong>java code</strong></p>
  
  <pre><code>ImageView q1Image = (ImageView)findViewById(R.id.q1Image);
  q1Image.setScaleType(ScaleType.FIT_XY);
  </code></pre>
  
  <p><strong>xml code</strong></p>
  
  <pre><code>&lt;TableRow
      android:id="@+id/row4"
      android:layout_width="0dip"
      android:layout_height="wrap_content"
      android:layout_weight="1" &gt;
  
      &lt;ImageView
          android:id="@+id/q1Image"
          android:layout_width="10dp"
          android:layout_height="10dp"
          android:layout_weight=".1"
          android:textSize="8sp"
          android:gravity="center_horizontal" /&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/cuzne.png" alt="test"></p>
  
  <p><strong>EDIT</strong>
  If I make the width and height equal to <code>50dp</code> each, the image gets bigger but is still a flat looking rectangle.</p>