title: How to keep a TextView square?
body: <p>I found <a href="https://stackoverflow.com/a/3203344/1145666">this answer</a>, which makes sure the aspect ratio is preserved of the an <code>ImageView</code>.</p>
  
  <p>How would I be able to do that with a <code>TextView</code> with a background drawable? I have this <code>TextView</code>:</p>
  
  <pre><code>       &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceSmall"
              android:padding="5dp"
              android:layout_margin="5dp"
              android:text="1"
              android:textColor="@color/white"
              android:id="@+id/tvCount"
              android:background="@drawable/textview_notify"
              android:layout_column="2"
              android:layout_gravity="right|top"/&gt;
  </code></pre>
  
  <p>and this is my background drawable:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:shape="oval"
      &gt;
      &lt;!-- The fill color --&gt;
      &lt;solid android:color="@color/red" /&gt;
      &lt;!-- Just to add a border --&gt;
      &lt;stroke
          android:color="@color/white"
          android:width="2dp"
          /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>How to make sure the <code>TextView</code> stays square (and the background thus a perfect circle?).</p>