linphone-android/app/src/main/res/layout/chat_bubble.xml
2019-03-04 17:42:10 +01:00

176 lines
6.5 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:id="@+id/rightAnchor"
android:layout_width="3dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"/>
<CheckBox
android:id="@+id/delete_event"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"
android:adjustViewBounds="true"
android:button="@drawable/checkbox"
android:clickable="false"
android:contentDescription="@string/content_description_delete" />
<LinearLayout
android:id="@+id/event"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@id/delete_event"
android:background="@drawable/event_decoration_gray"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/event_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/backgroundColor"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textAppearance="@style/group_chat_event_font" />
</LinearLayout>
<LinearLayout
android:id="@+id/security_event"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
android:layout_toLeftOf="@id/delete_event"
android:background="@drawable/event_decoration_red"
android:gravity="center"
android:orientation="horizontal"
android:visibility="gone">
<TextView
android:id="@+id/security_event_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="?attr/backgroundColor"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:textAppearance="@style/group_chat_security_event_font" />
</LinearLayout>
<RelativeLayout
android:id="@+id/bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/rightAnchor">
<LinearLayout
android:id="@+id/background"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/time"
android:layout_marginLeft="45dp"
android:layout_marginTop="1dp"
android:layout_marginRight="3dp"
android:layout_marginBottom="1dp"
android:layout_toLeftOf="@+id/imdn"
android:background="@drawable/chat_bubble_outgoing_full"
android:orientation="vertical"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<com.google.android.flexbox.FlexboxLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/multi_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
app:flexWrap="wrap" />
<RelativeLayout
android:id="@+id/single_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp">
<include layout="@layout/chat_bubble_content" />
</RelativeLayout>
<org.linphone.views.MultiLineWrapContentWidthTextView
android:id="@+id/message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="5dp"
android:textAppearance="@style/chat_bubble_message_font" />
</LinearLayout>
<ProgressBar
android:id="@+id/download_in_progress"
android:visibility="gone"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_toRightOf="@id/background"
android:layout_alignBottom="@id/background"
android:indeterminateTint="?attr/accentColor" />
<RelativeLayout
android:id="@+id/message_sender_avatar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@id/background"
android:layout_marginLeft="5dp">
<include layout="@layout/contact_avatar" />
</RelativeLayout>
<TextView
android:id="@id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="45dp"
android:layout_marginTop="7dp"
android:layout_marginRight="5dp"
android:layout_toLeftOf="@id/imdn"
android:gravity="right"
android:textAppearance="@style/chat_bubble_time_font" />
<ImageView
android:id="@id/imdn"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignLeft="@id/delete_message"
android:layout_alignBottom="@id/background"
android:layout_alignParentRight="true"
android:layout_marginRight="5dp"
android:src="@drawable/imdn_received" />
<ProgressBar
android:id="@+id/send_in_progress"
android:layout_width="10dp"
android:layout_height="10dp"
android:layout_alignBottom="@id/background"
android:layout_alignParentRight="true"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp"
android:indeterminateTint="?attr/accentColor" />
</RelativeLayout>
</RelativeLayout>