Improve conversation view
This commit is contained in:
		
							
								
								
									
										9
									
								
								app/src/main/res/drawable/ic_menu.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/ic_menu.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| <vector xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     android:width="24dp" | ||||
|     android:height="24dp" | ||||
|     android:viewportHeight="24" | ||||
|     android:viewportWidth="24"> | ||||
|     <path | ||||
|         android:fillColor="#000" | ||||
|         android:pathData="M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z" /> | ||||
| </vector> | ||||
							
								
								
									
										59
									
								
								app/src/main/res/layout/fragment_conversation_detail.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								app/src/main/res/layout/fragment_conversation_detail.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     xmlns:tools="http://schemas.android.com/tools" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="match_parent"> | ||||
|  | ||||
|     <RelativeLayout | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:fitsSystemWindows="true" | ||||
|         android:focusableInTouchMode="true" | ||||
|         android:orientation="vertical" | ||||
|         android:paddingBottom="64dp"> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/subject" | ||||
|             android:layout_width="0dp" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_alignParentStart="true" | ||||
|             android:layout_alignParentTop="true" | ||||
|             android:layout_toStartOf="@+id/avatar" | ||||
|             android:elegantTextHeight="false" | ||||
|             android:enabled="false" | ||||
|             android:gravity="center_vertical" | ||||
|             android:padding="16dp" | ||||
|             android:textAppearance="?android:attr/textAppearanceLarge" | ||||
|             tools:ignore="UnusedAttribute" | ||||
|             tools:text="Subject" /> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/avatar" | ||||
|             android:layout_width="40dp" | ||||
|             android:layout_height="40dp" | ||||
|             android:layout_alignParentEnd="true" | ||||
|             android:layout_alignParentTop="true" | ||||
|             android:layout_margin="10dp" | ||||
|             android:src="@color/colorAccent" | ||||
|             tools:ignore="ContentDescription" /> | ||||
|  | ||||
|  | ||||
|         <View | ||||
|             android:id="@+id/divider" | ||||
|             android:layout_width="fill_parent" | ||||
|             android:layout_height="2dip" | ||||
|             android:layout_below="@id/subject" | ||||
|             android:background="@color/divider" /> | ||||
|  | ||||
|         <android.support.v7.widget.RecyclerView | ||||
|             android:id="@+id/messages" | ||||
|             android:layout_width="fill_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_below="@+id/divider" | ||||
|             android:animateLayoutChanges="true" | ||||
|             android:layout_marginLeft="16dp" | ||||
|             android:layout_marginRight="16dp" | ||||
|             android:layout_marginBottom="16dp"/> | ||||
|  | ||||
|     </RelativeLayout> | ||||
| </ScrollView> | ||||
							
								
								
									
										103
									
								
								app/src/main/res/layout/item_message_detail.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								app/src/main/res/layout/item_message_detail.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,103 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|     xmlns:tools="http://schemas.android.com/tools" | ||||
|     android:layout_width="match_parent" | ||||
|     android:layout_height="wrap_content" | ||||
|     android:fitsSystemWindows="true" | ||||
|     android:focusableInTouchMode="true" | ||||
|     android:orientation="vertical"> | ||||
|  | ||||
|     <RelativeLayout | ||||
|         android:id="@+id/header" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content"> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/avatar" | ||||
|             android:layout_width="40dp" | ||||
|             android:layout_height="40dp" | ||||
|             android:layout_alignParentStart="true" | ||||
|             android:layout_centerVertical="true" | ||||
|             android:layout_marginTop="8dp" | ||||
|             android:src="@color/colorAccent" | ||||
|             tools:ignore="ContentDescription" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/sender" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="20dp" | ||||
|             android:layout_alignTop="@+id/avatar" | ||||
|             android:layout_toEndOf="@+id/avatar" | ||||
|             android:layout_toStartOf="@+id/status" | ||||
|             android:gravity="center_vertical" | ||||
|             android:paddingEnd="0dp" | ||||
|             android:paddingStart="8dp" | ||||
|             android:textStyle="bold" | ||||
|             tools:text="Sender" /> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/recipient" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="20dp" | ||||
|             android:layout_alignBottom="@+id/avatar" | ||||
|             android:layout_toEndOf="@+id/avatar" | ||||
|             android:layout_toStartOf="@+id/status" | ||||
|             android:gravity="center_vertical" | ||||
|             android:paddingEnd="0dp" | ||||
|             android:paddingStart="8dp" | ||||
|             tools:text="Recipient" /> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/status" | ||||
|             android:layout_width="wrap_content" | ||||
|             android:layout_height="40dp" | ||||
|             android:layout_centerVertical="true" | ||||
|             android:layout_toStartOf="@+id/menu" | ||||
|             android:paddingBottom="8dp" | ||||
|             android:paddingTop="8dp" | ||||
|             android:tint="@color/colorAccent" | ||||
|             tools:ignore="ContentDescription" | ||||
|             tools:src="@drawable/ic_notification_proof_of_work" /> | ||||
|  | ||||
|         <ImageView | ||||
|             android:id="@+id/menu" | ||||
|             android:layout_width="40dp" | ||||
|             android:layout_height="40dp" | ||||
|             android:layout_alignParentEnd="true" | ||||
|             android:layout_centerVertical="true" | ||||
|             android:contentDescription="@string/context_menu" | ||||
|             android:padding="8dp" | ||||
|             android:src="@drawable/ic_menu" /> | ||||
|  | ||||
|     </RelativeLayout> | ||||
|  | ||||
|     <LinearLayout | ||||
|         android:id="@+id/body" | ||||
|         android:layout_width="match_parent" | ||||
|         android:layout_height="wrap_content" | ||||
|         android:orientation="vertical"> | ||||
|  | ||||
|         <TextView | ||||
|             android:id="@+id/text" | ||||
|             android:layout_width="match_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginBottom="16dp" | ||||
|             android:layout_marginTop="16dp" | ||||
|             android:textIsSelectable="true" | ||||
|             tools:text="Message Body" /> | ||||
|  | ||||
|         <android.support.v7.widget.RecyclerView | ||||
|             android:id="@+id/labels" | ||||
|             android:layout_width="fill_parent" | ||||
|             android:layout_height="wrap_content" | ||||
|             android:layout_marginBottom="16dp" /> | ||||
|  | ||||
|     </LinearLayout> | ||||
|  | ||||
|     <View | ||||
|         android:id="@+id/divider" | ||||
|         android:layout_width="fill_parent" | ||||
|         android:layout_height="2dip" | ||||
|         android:background="@color/divider" /> | ||||
|  | ||||
| </LinearLayout> | ||||
							
								
								
									
										15
									
								
								app/src/main/res/menu/conversation.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								app/src/main/res/menu/conversation.xml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
|  | ||||
| <menu xmlns:android="http://schemas.android.com/apk/res/android" | ||||
|       xmlns:app="http://schemas.android.com/apk/res-auto"> | ||||
|     <item | ||||
|             android:id="@+id/delete" | ||||
|             app:showAsAction="ifRoom" | ||||
|             android:icon="@drawable/ic_action_delete" | ||||
|             android:title="@string/delete"/> | ||||
|     <item | ||||
|             android:id="@+id/archive" | ||||
|             app:showAsAction="ifRoom" | ||||
|             android:icon="@drawable/ic_action_archive" | ||||
|             android:title="@string/archive"/> | ||||
| </menu> | ||||
| @@ -136,4 +136,5 @@ As an alternative you could configure a trusted node in the settings, but as of | ||||
|     <string name="broadcasts">Broadcasts</string> | ||||
|     <string name="encoding_simple">simple</string> | ||||
|     <string name="encoding_extended">extended</string> | ||||
|     <string name="context_menu">actions</string> | ||||
| </resources> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user