Fix chatlist row
This commit is contained in:
parent
88e830b1c0
commit
8067e8773c
4 changed files with 133 additions and 23 deletions
|
@ -18,7 +18,7 @@
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" android:layout_alignParentTop="true"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -68,6 +68,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginTop="5dp"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
|
android:layout_alignBottom="@id/sipUri"
|
||||||
style="@style/font2"/>
|
style="@style/font2"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -88,15 +89,14 @@
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/unreadMessages"
|
android:id="@+id/unreadMessages"
|
||||||
android:layout_width="25dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="20dp"
|
||||||
android:background="@drawable/chat_list_indicator"
|
android:background="@drawable/chat_list_indicator"
|
||||||
style="@style/font18"
|
style="@style/font18"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:layout_above="@+id/lastMessage"
|
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_alignParentEnd="true"/>
|
android:layout_alignParentEnd="true" android:layout_alignParentTop="true"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/lastMessage"
|
android:id="@+id/lastMessage"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="60dp"
|
android:layout_height="80dp"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:paddingLeft="10dp"
|
android:paddingLeft="10dp"
|
||||||
android:paddingRight="10dp"
|
android:paddingRight="10dp"
|
||||||
|
@ -12,13 +12,12 @@
|
||||||
android:id="@+id/delete_chatroom"
|
android:id="@+id/delete_chatroom"
|
||||||
android:button="@drawable/checkbox"
|
android:button="@drawable/checkbox"
|
||||||
android:contentDescription="@string/content_description_delete"
|
android:contentDescription="@string/content_description_delete"
|
||||||
android:paddingRight="5dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" android:layout_alignParentTop="true"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -55,6 +54,15 @@
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<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:singleLine="true"
|
||||||
|
style="@style/font2"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -62,14 +70,6 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingLeft="10dp">
|
android:paddingLeft="10dp">
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/date"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:singleLine="true"
|
|
||||||
style="@style/font2"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/sipUri"
|
android:id="@+id/sipUri"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
|
@ -79,17 +79,14 @@
|
||||||
android:fadingEdge="horizontal"
|
android:fadingEdge="horizontal"
|
||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
style="@style/font6"
|
style="@style/font6"
|
||||||
android:paddingLeft="10dp"
|
|
||||||
android:layout_marginTop="5dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_toRightOf="@id/date"
|
|
||||||
android:layout_marginRight="30dp"/>
|
android:layout_marginRight="30dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/unreadMessages"
|
android:id="@+id/unreadMessages"
|
||||||
android:layout_width="25dp"
|
android:layout_width="20dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="20dp"
|
||||||
android:background="@drawable/chat_list_indicator"
|
android:background="@drawable/chat_list_indicator"
|
||||||
style="@style/font18"
|
style="@style/font18"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
|
@ -105,6 +102,7 @@
|
||||||
android:layout_below="@id/sipUri"
|
android:layout_below="@id/sipUri"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="30dp"
|
||||||
style="@style/font11"/>
|
style="@style/font11"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
112
res/layout-sw533dp/chatlist_cell.xml
Normal file
112
res/layout-sw533dp/chatlist_cell.xml
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
<?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="100dp"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:paddingLeft="10dp"
|
||||||
|
android:paddingRight="10dp"
|
||||||
|
android:paddingTop="5dp"
|
||||||
|
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: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">
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:id="@+id/avatar_layout"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerHorizontal="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/contact_picture"
|
||||||
|
android:src="@drawable/avatar"
|
||||||
|
android:contentDescription="@string/content_description_contact_picture"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:adjustViewBounds="true"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/mask"
|
||||||
|
android:src="@drawable/avatar_mask"
|
||||||
|
android:contentDescription="@string/content_description_contact_picture"
|
||||||
|
android:layout_width="35dp"
|
||||||
|
android:layout_height="35dp"
|
||||||
|
android:adjustViewBounds="true"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<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:singleLine="true"
|
||||||
|
style="@style/font2"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:paddingLeft="10dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/sipUri"
|
||||||
|
android:lines="1"
|
||||||
|
android:ellipsize="marquee"
|
||||||
|
android:marqueeRepeatLimit="marquee_forever"
|
||||||
|
android:scrollHorizontally="true"
|
||||||
|
android:fadingEdge="horizontal"
|
||||||
|
android:singleLine="true"
|
||||||
|
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="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:background="@drawable/chat_list_indicator"
|
||||||
|
style="@style/font18"
|
||||||
|
android:gravity="center"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:layout_above="@+id/lastMessage"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_alignParentEnd="true"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lastMessage"
|
||||||
|
android:maxLines="3"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:layout_below="@id/sipUri"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="30dp"
|
||||||
|
style="@style/font11"/>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</RelativeLayout>
|
|
@ -12,13 +12,12 @@
|
||||||
android:id="@+id/delete_chatroom"
|
android:id="@+id/delete_chatroom"
|
||||||
android:button="@drawable/checkbox"
|
android:button="@drawable/checkbox"
|
||||||
android:contentDescription="@string/content_description_delete"
|
android:contentDescription="@string/content_description_delete"
|
||||||
android:paddingRight="5dp"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:adjustViewBounds="true"
|
android:adjustViewBounds="true"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:visibility="invisible" />
|
android:visibility="invisible" android:layout_alignParentTop="true"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -103,6 +102,7 @@
|
||||||
android:layout_below="@id/sipUri"
|
android:layout_below="@id/sipUri"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginRight="30dp"
|
||||||
style="@style/font11"/>
|
style="@style/font11"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
Loading…
Reference in a new issue