Wrap Text - Android TextView -
before says should google this, want point out did , tried different methods see work , nothing did me. so, ugly business out of way on questions.... :)
i cannot seem text view wrap me. dont know why. here xml code layout. table layout used listview in xml layout.
<?xml version="1.0" encoding="utf-8"?> <tablelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <tablerow android:layout_width="fill_parent" android:layout_height="wrap_content"> <textview android:id="@+id/ot_color_priority" android:layout_height="fill_parent" android:layout_width="20dp" android:gravity="center_vertical"/> <relativelayout> <textview android:id="@+id/ot_ticket_number" android:layout_height="wrap_content" android:layout_width="match_parent" android:gravity="center" android:textstyle="bold"/> <textview android:id="@+id/ot_ticket_details" android:layout_alignparentbottom="@id/ot_ticket_number" android:layout_height="wrap_content" android:layout_width="300dp" android:layout_margintop="15dp" android:scrollhorizontally="false" android:ellipsize="none" android:maxlines="10" android:text="this long dang string never wants freaking wrap worth crap!"/> </relativelayout> </tablerow> </tablelayout>
the data in textview continues write off screen right. cannot wrap. way can seem work if set dp value layout_width. dont want because used on different devices screen resolutions , afraid may cause problems later on.
so please me :(
you should set android:shrinkcolumns="1"
tablelayout
.
it shrink second column occupied relativelayout
.
Comments
Post a Comment