Ich möchte mehrzeilige Textansicht implementieren, die ein festes Layout behält. Dies ist der erwartete Ausgabebildschirm .Mehrzeilige Textansicht, während das Layout fixiert bleibt
Und das ist Ausgabe ich bekomme .
<LinearLayout
android:id="@+id/layout_product_desc"
android:layout_width="0dp"
android:layout_weight="0.75"
android:layout_height="match_parent"
android:padding="4dp"
android:gravity="center"
android:weightSum="1"
android:orientation="vertical">
<LinearLayout
android:layout_weight="0.90"
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:id="@+id/txt_product_title"
style="@style/Appio.Text.Dark.Normal"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="start"
android:layout_weight="0.40"
android:maxLines="2"/>
<TextView
android:id="@+id/txt_product_subtitle_or_model"
style="@style/Appio.Text.Dark.Small"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="start"
android:layout_weight="0.20"
android:maxLines="1"/>
<TextView
android:id="@+id/txt_product_short_description"
style="@style/Appio.Text.Dark.Small"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="start"
android:layout_weight="0.20"
android:maxLines="1"/>
<TextView
android:id="@+id/txt_product_availability"
style="@style/Appio.Text.Dark.Small"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_gravity="start"
android:layout_weight="0.20"
android:maxLines="1"/>
</LinearLayout>
<TextView
android:id="@+id/txt_product_cost"
style="@style/Appio.Text.Primary.Normal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:layout_weight="0.10"
android:maxLines="1"/>
</LinearLayout>
Obwohl ich MaxLine und Weight-Eigenschaft zuweisen, blieb das Layout nicht behoben. Und einige von "Ausverkauft" zeigen wie in Bild 2. Wie löse ich dieses Problem?