title: Android: Last line of textview cut off
body: <p>I have a horizontal <code>LinearLayout</code> containing a <code>TextView</code> followed by a <code>Spinner</code> next to it. This <code>LinearLayout</code> is dynamically inflated multiple times in a fixed vertical <code>LinearLayout</code> contained within a <code>RelativeLayout</code>.</p>
  
  <p>The problem is that since I switched from <code>Theme.light</code> to <code>Theme.holo.light</code>, the last line of the <code>TextView</code> gets cut in half. This happens when the dynamic text is long and spans more than one row.</p>
  
  <p><img src="https://i.stack.imgur.com/AQp6x.jpg" alt="enter image description here"></p>
  
  <p>I have been able to fix this by adding bottom padding to the horizontal <code>LinearLayout</code> containing the <code>TextView</code> and <code>Spinner</code>.</p>
  
  <p>This does not feel like a fix, but more of a hack. Can someone please give me some advice on how to properly fix this?</p>
  
  <p>I have also read some other questions, but none seem to help.</p>
  
  <p>Horizontal Linear layout:</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="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;TextView
          android:id="@+id/textView1"
          android:layout_width="150dp"
          android:layout_height="wrap_content"
          android:layout_marginRight="20dp"
          android:text="TextView"/&gt;
  
      &lt;Spinner
          android:id="@+id/spinner1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"/&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Relative layout where above layout is dynamically inflated at Linear Layout with id ll2_7:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;ScrollView
          android:id="@+id/scrollView"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_above="@+id/relLayoutButtonNext"
          android:layout_below="@id/textView1" &gt;
  
          &lt;RelativeLayout
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:paddingBottom="20dp"
              android:paddingLeft="10dp"
              android:paddingRight="10dp"
              android:paddingTop="10dp" &gt;
  
              &lt;TextView
                  android:id="@+id/textView10"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingRight="30dp"
                  android:text="2.7" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView11"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="10dp"
                  android:layout_toRightOf="@id/textView10"
                  android:text="@string/question2_7" /&gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/ll2_7"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView11"
                  android:layout_below="@+id/textView11"
                  android:orientation="vertical" android:layout_marginBottom="20dp"&gt;
              &lt;/LinearLayout&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/ScrollView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>EDIT:</strong>
  Here is the complete layout xml for above:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 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/textView1"
          style="@style/question_section_title"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:text="@string/question2_header" /&gt;
  
      &lt;RelativeLayout
          android:id="@+id/relLayoutButtonNext"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:background="@color/bottomBar"
          android:paddingBottom="3dp"
          android:paddingLeft="50dp"
          android:paddingRight="50dp"
          android:paddingTop="3dp" &gt;
  
          &lt;Button
              android:id="@+id/buttonNext"
              android:layout_width="180dp"
              android:layout_height="wrap_content"
              android:layout_alignParentRight="true"
              android:onClick="nextStep"
              android:text="Next Section"
              android:textSize="20sp" /&gt;
  
          &lt;Button
              android:id="@+id/buttonPrevious"
              android:layout_width="180dp"
              android:layout_height="wrap_content"
              android:layout_alignParentLeft="true"
              android:layout_alignParentTop="true"
              android:onClick="previousStep"
              android:text="Previous Section"
              android:textSize="20sp" /&gt;
      &lt;/RelativeLayout&gt;
  
  
      &lt;ScrollView
          android:id="@+id/scrollView"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_above="@+id/relLayoutButtonNext"
          android:layout_below="@id/textView1" &gt;
  
  
  
          &lt;RelativeLayout
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:paddingBottom="20dp"
              android:paddingLeft="10dp"
              android:paddingRight="10dp"
              android:paddingTop="10dp" &gt;
  
              &lt;TextView
                  android:id="@+id/textView10"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:paddingRight="30dp"
                  android:text="2.7" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView11"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_marginBottom="10dp"
                  android:layout_toRightOf="@id/textView10"
                  android:text="@string/question2_7" /&gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/ll2_7"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView11"
                  android:layout_below="@+id/textView11"
                  android:orientation="vertical" android:layout_marginBottom="20dp"&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;TextView
                  android:id="@+id/textView2"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView10"
                  android:layout_below="@+id/ll2_7"
                  android:text="2.8" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView3"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/ll2_7"
                  android:layout_toRightOf="@+id/textView10"
                  android:text="@string/question2_8" android:layout_marginBottom="10dp"/&gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/ll2_8"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView3"
                  android:layout_below="@+id/textView3"
                  android:layout_marginBottom="20dp"
                  android:orientation="vertical" &gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;TextView
                  android:id="@+id/textView4"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView2"
                  android:layout_below="@+id/ll2_8"
                  android:text="2.9" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView5"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/ll2_8"
                  android:layout_toRightOf="@+id/textView10"
                  android:text="@string/question2_9" android:layout_marginBottom="10dp"/&gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/ll2_9"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/textView5"
                  android:layout_toRightOf="@+id/textView10"
                  android:orientation="vertical" android:layout_marginBottom="20dp"&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;TextView
                  android:id="@+id/textView6"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView4"
                  android:layout_below="@+id/ll2_9"
                  android:text="2.10" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView7"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/ll2_9"
                  android:layout_toRightOf="@+id/textView10"
                  android:text="@string/question2_10" android:layout_marginBottom="10dp"/&gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/ll2_10"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/textView7"
                  android:layout_marginBottom="20dp"
                  android:layout_toRightOf="@+id/textView10"
                  android:orientation="vertical" &gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;TextView
                  android:id="@+id/textView8"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView6"
                  android:layout_below="@+id/ll2_10"
                  android:text="2.11" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView9"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/ll2_10"
                  android:layout_toRightOf="@+id/textView10"
                  android:text="@string/quesiton2_11" android:layout_marginBottom="10dp"/&gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/ll2_11"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView9"
                  android:layout_below="@+id/textView9"
                  android:orientation="vertical" android:layout_marginBottom="20dp"&gt;
  
              &lt;/LinearLayout&gt;
  
              &lt;TextView
                  android:id="@+id/textView12"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_alignLeft="@+id/textView8"
                  android:layout_below="@+id/ll2_11"
                  android:text="2.11.1" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView13"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/ll2_11"
                  android:layout_toRightOf="@+id/textView10"
                  android:text="@string/question2_11_1" android:layout_marginBottom="10dp"/&gt;
  
  
              &lt;LinearLayout
                  android:id="@+id/ll2_11_1"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_below="@+id/textView13"
                  android:layout_toRightOf="@+id/textView10"
                  android:orientation="vertical" android:layout_marginBottom="20dp"&gt;
  
              &lt;/LinearLayout&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/ScrollView&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>