21 July 2012

How to solve problem with textview do not display many lines corectly in android?

Solution works for android 2.3.3(it should works for other versions as well)

so you in your gorgeous text view want to have many lines .... so you set it ... and ... second and other lines are ... cut.WTF ... i mean What a Terrible Failure .you think...

Solution:
in my case:
<TextView
  android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:maxLines="5"
android:lines="5"

android:text="@string/preparing"/>

this 2 lines makes textView works as i expected.
android:singleLine="false"
android:maxLines="5"
android:lines="5"


 this stops works when ... I added
android:ellipsize="end" or  "marquee"