1

この質問が何度も聞かれたことは知っていますが、それでもこれを機能させることができないようです。私はあらゆる種類の組み合わせを試しましたが、2行に折り返すことを拒否します。

これが現在の状況です。

    <TextView
        android:id="@+id/doctor_details_clinic_name"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingRight="3dip"
        android:textSize="12sp"
        android:maxLines="1"
        android:layout_gravity="right"
        android:gravity="right"
        android:scrollHorizontally="false"
        android:singleLine="false"
        android:ellipsize="none"
        />

私は幅を0dipにしようとしましたが、他のすべての提案は一致しませんでした。

4

1 に答える 1

1

まず、最大行数を1ではなく2に設定する必要があります。次のように機能します。

    <TextView
        android:id="@+id/myText"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:maxLines="2"
        android:ellipsize="end"
        android:text="this is the most interesting use of text view I have seen so far,this is the most interesting use of text view I have ever seen so far,this is the most interesting use of text view I have ever seen so far this is the most interesting use of text view I have ever seen so far"/>
于 2012-08-22T06:34:54.617 に答える