title: Square ImageView
body: <p>I am trying to show an <code>ImageView</code> which is always square in shape inside a dialog. The dimensions may vary depending upon the resolution of the display(Width in portrait to be precise) but the ImageView is required to form the largest Square possible to accomodate a square image inside it. This is my XML code for the same.</p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/dialog_image"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:scaleType="centerInside"
      android:adjustViewBounds="true"
      /&gt;
  </code></pre>
  
  <p>But the problem is that the <code>Square</code> image is set dynamically at runtime and the ImageView ends up being a rectangle with breadth as the Square Image size. What can i do to achieve the same?</p>
  
  <p><strong>EDIT:</strong> To give an idea of what i am trying to achieve is like what is shown when a contact is selected in contacts application and the profile picture is clicked. It zooms out and remains as a square on top of the activity.</p>