0
Ich verwende dieses Layout in einer SchleuderPrevent Ansichten in Bezug Layout überlappen in Spinner
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:mode="twoLine"
android:paddingEnd="4dp">
<TextView android:id="@+id/text"
android:layout_width="match_parent"
android:paddingLeft="15dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="?attr/textAppearanceListItem" />
<TextView android:id="@+id/text2"
android:layout_width="match_parent"
android:paddingBottom="14dp"
android:paddingLeft="15dp"
android:layout_height="wrap_content"
android:layout_below="@id/text"
android:layout_alignStart="@id/text"
android:textAppearance="?attr/textAppearanceListItemSmall" />
<TextView android:id="@+id/text3"
android:layout_width="match_parent"
android:paddingLeft="15dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textAppearance="?attr/textAppearanceListItemSmall"
android:gravity="right" />
</RelativeLayout>
Wenn die ersten Textviews Inhalt zu lang sie auf den dritten Textview überlappen.
Ich habe
versuchtandroid:layout_weight="1"
android:ellipsize="none"
android:maxLines="2"
android:scrollHorizontally="false"
auf den ersten Blick, die nichts tut. Ich habe auch versucht, layout_tostartof auf text3 zu setzen, indem ich layout_toleftof auf text 3 setze, was meine Sicht verschwinden lässt, wahrscheinlich vom Spinner weg.
folgt Betrachten 'LinearLayout' mit und stellen Sie dann' layout_weight' Eigenschaft –
Haben Sie text3 Versuchen Sie, unter text2 zu sein (layout_below verwenden)? –