title: Limit numbers of lines in TextView
body: <p>I have a scrollable textView, and I want to limit the number of lines displayed, however xml properties are not working :</p>
  
  <pre><code>&lt;TextView
     android:id="@+id/tv_addesc"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:scrollbars="vertical"
     android:maxLines="12"
     android:textColor="#FFFFFFFF"
     android:textSize="15sp" /&gt;
  </code></pre>
  
  <p>the number of lines displayed is 50 and there are 900 chars in the text.</p>
  
  <p>How can I limit the number of lines displayed and make it scrollable ?</p>
  
  <p>Edit : I tested with 846 lines and 15824 chars, the whole text is displayed regardless of different properties set.</p>
  
  <p>Edit : there was a second component besides the textView, when i removed it it worked, so I will find a workaround. Thank you !</p>