I have this layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="wrap_content"
android:layout_gravity="center" android:cacheColorHint="#0000"
android:background="@layout/selectorgreybutton"
>
<LinearLayout
android:orientation="horizontal"
style="@style/wrap_content"
android:layout_alignParentLeft="true"
>
<TextView android:id="@+id/group_type"
android:paddingRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="17dip"
android:singleLine="false"
/>
<TextView
android:id="@+id/group_num"
android:paddingRight="10dip"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/black"
android:textSize="17dip"
android:layout_toRightOf="@id/group_type"
android:singleLine="true"
android:gravity="center_vertical"
/>
</LinearLayout>
<TextView
android:id="@+id/arrow"
android:text=">"
android:textSize="20dp"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:textColor="@color/black"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
style="@style/wrap_content"
/>
</RelativeLayout>
The problem is that I only can display completly the 1st TextView but not the 2nd inside the LinearLayout, this one appears with dots… And I want to display always the 2nd TextView completely, and the 1st one autoadjust in 1 or 2 lines.
Any ideas?
you can use
this attribute for 1st textview and remaining width will use second textview.