Momentan erstelle ich ein Layout für mein Chat ListView. Das Layout besteht aus einer Textansicht, die als Sprechblase fungiert, und daneben gibt es eine Textansicht für timeStamp. Das Problem mit meinem Layout ist, wenn mein Text sehr lang ist, schneidet der erste TextView den Platz, der vom zweiten TextView verwendet werden sollte. So verschwindet das zweite TextView.Textansicht im verschachtelten linearen Layout wird geschnitten?
Hier ist meine xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left"
android:paddingLeft="10dp"
android:paddingRight="40dp"
android:paddingBottom="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:text="sssssssssssssssssssyssssssssssssss"
android:padding="10dp"
android:background="@color/grey"
android:textColor="@color/white"
android:textSize="15sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/chat_bubble" />
<TextView
android:text="read"
android:textSize="8sp"
android:layout_marginLeft="5dp"
android:layout_gravity="left|bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/time_label" />
</LinearLayout>
</LinearLayout>
bitte diese Bibliothek überprüfen: https://github.com/DeromirNeves/whatsapp-android –