title: Vertical TextView taking too much space in Android
body: <p>I am trying to create something like the following using LinearLayout and TableLayout:</p>
  
  <p><img src="https://i.stack.imgur.com/Igr0f.png" alt="enter image description here"></p>
  
  <p>I am stuck on Vertical Text, though. It is taking more space than it should take after rotation. </p>
  
  <p>The following is the XML</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;TextView
          android:id="@+id/tv_CONSEQUENCES"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:rotation="-90"
          android:text="CONSEQUENCES"
          android:textAppearance="?android:attr/textAppearanceLarge" /&gt;
  
      &lt;TableLayout
          android:layout_width="wrap_content"
          android:layout_height="match_parent" &gt;
  
          &lt;TableRow
              android:id="@+id/tableRow1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" &gt;
  
              &lt;Button
                  android:id="@+id/button1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button4"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button3"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
          &lt;/TableRow&gt;
  
          &lt;TableRow
              android:id="@+id/tableRow1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" &gt;
  
              &lt;Button
                  android:id="@+id/button1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button4"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button3"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
          &lt;/TableRow&gt;
           &lt;TableRow
              android:id="@+id/tableRow1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" &gt;
  
              &lt;Button
                  android:id="@+id/button1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button4"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button3"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
          &lt;/TableRow&gt;
           &lt;TableRow
              android:id="@+id/tableRow1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" &gt;
  
              &lt;Button
                  android:id="@+id/button1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button4"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button3"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
              &lt;Button
                  android:id="@+id/button2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Button" /&gt;
  
          &lt;/TableRow&gt;
      &lt;/TableLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and the output is like this:</p>
  
  <p><img src="https://i.stack.imgur.com/Rlb5Y.png" alt="enter image description here"></p>
  
  <p>The vertical text is taking more space than it should need, and not all of the text is appearing. :(</p>