Currently I'm creating a layout for my Chat listView. The layout consist of a TextView which act as the chat bubble, and beside it there's a TextView for timeStamp. The problem with my layout is when my text is super long the first TextView will cut the space that should be used by the second TextView. So the second TextView is disappearing.
Here is my 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>