1
テキストビューでellipseizeを使用しています。ここから、それは切り捨てられるべきだと言いました。 しかし、私はそれがtruncted取得して表示されません。基本的には、2つのテキストフィールドが隣り合っていてほしいです。 右側のtxt1と左側のtxt2。私はそれが長すぎるときに切り捨てられたtxt2をしたい。しかし、私が今見ているのは、txt1のテキストが重複しているということです。TextViewでellipseizeを使用する際の質問
http://developer.android.com/reference/android/widget/TextView.html#attr_android:ellipsize
<RelativeLayout
android:id="@+id/one"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/txt1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:singleLine="true"
android:layout_centerVertical="true"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="?android:attr/textColorPrimary"/>
<TextView
android:id="@+id/txt2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_toRightOf="@id/txt1"
android:ellipsize="end"
android:singleLine="true"
android:layout_weight="1"
android:layout_centerVertical="true"
/>
</RelativeLayout>