Add two textviews end to end in android xml -
i want add textview right @ end of textview, ie not in next line, previous textview ends, in xml file. like:
| <textview1><textview2> | | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbb | my xml file:
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > <textview android:id="@+id/textview" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" android:ellipsize="none"/> <textview android:id="@+id/date" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="bbb" /> </linearlayout> but text "bbb" not shown. can help?
use following.
<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > <textview android:id="@+id/textview" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:ellipsize="none" android:text="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" /> <textview android:id="@+id/date" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="bbb" /> </linearlayout>
Comments
Post a Comment