xmlの詳細がよくなく、次の問題の解決策が見つかりません。
ListViewがあります。1つの行は次のxmlコードのように定義されます:
<?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="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical" >
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="#ff888888"
android:textSize="10dp"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingLeft="5dp"
android:text="02 OCT"
android:textStyle="bold"
/>
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ff000000"
android:textSize="14dp"
android:singleLine="true"
android:ellipsize="end"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="GIRLFRIEND COFFE AT STARBUCKS COFFE"
android:maxWidth="250dip"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/icon_clip"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:id="@+id/img_posted_check"
/>
<TextView
android:id="@+id/relleno"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="#ff000000"
android:textSize="14dp"
android:singleLine="true"
android:ellipsize="end"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text=""
/>
<TextView
android:id="@+id/amount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="#ff000000"
android:textSize="14dp"
android:paddingLeft="5dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:paddingRight="5dp"
android:text="$13.34"
/>
</LinearLayout>
テキストが短い場合は、わかりました。
ただし、テキストの説明が非常に長い場合は、ウィンドウの制限まですべてのスペースが必要になり、「...」でトリミングされて価格とクリップマーカーが排出されます。
これを行うことができるのは、タイトルID(@ + id / title)のテキストビューに重み属性を追加するクリップを使用せず、ID'relleno'のレイアウトを使用しない場合のみです。