linphone-android/res/layout/chatlist_cell.xml
2018-10-25 10:10:22 +02:00

113 lines
No EOL
3.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="80dp"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:foreground="?android:attr/selectableItemBackground"
android:background="@drawable/list_selector">
<CheckBox
android:id="@+id/delete_chatroom"
android:button="@drawable/checkbox"
android:contentDescription="@string/content_description_delete"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:clickable="false"
android:adjustViewBounds="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:visibility="invisible" android:layout_alignParentTop="true"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center">
<include layout="@layout/contact_avatar"/>
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/avatar_layout"
android:layout_marginTop="5dp"
android:maxLines="1"
style="@style/font2"/>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_toLeftOf="@id/delete_chatroom"
android:paddingLeft="10dp">
<TextView
android:id="@+id/sipUri"
android:lines="1"
android:ellipsize="end"
android:scrollHorizontally="true"
android:maxLines="1"
style="@style/font6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="30dp"/>
<TextView
android:id="@+id/unreadMessages"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/content_description_unread_chat_message"
android:background="@drawable/unread_message_count_bg"
style="@style/font18"
android:gravity="center"
android:maxLines="1"
android:layout_above="@+id/lastMessageLayout"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<LinearLayout
android:id="@id/lastMessageLayout"
android:layout_below="@id/sipUri"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/lastMessage"
android:maxLines="2"
android:ellipsize="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/font11"/>
<ImageView
android:id="@+id/lastMessageFileTransfer"
android:src="@drawable/chat_file"
android:layout_marginLeft="5dp"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
<View
android:id="@+id/selected_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/notification_color_led"
android:visibility="invisible" />
</RelativeLayout>