瀏覽代碼

layout - edit message view

sowjanyakch 1 年之前
父節點
當前提交
7d4abf19a1
共有 2 個文件被更改,包括 71 次插入0 次删除
  1. 7 0
      app/src/main/res/layout/activity_chat.xml
  2. 64 0
      app/src/main/res/layout/edit_message_view.xml

+ 7 - 0
app/src/main/res/layout/activity_chat.xml

@@ -133,6 +133,7 @@
             <include layout="@layout/item_custom_incoming_text_message_shimmer" />
 
             <include layout="@layout/item_custom_incoming_text_message_shimmer" />
+
         </LinearLayout>
 
         <com.stfalcon.chatkit.messages.MessagesList
@@ -258,6 +259,12 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:orientation="vertical">
+            <include
+                layout = "@layout/edit_message_view"
+                android:layout_width = "match_parent"
+                android:layout_height = "wrap_content"
+                android:layout_above = "@id/messageInputView">
+            </include>
 
         <com.nextcloud.talk.ui.MessageInput
             android:id="@+id/messageInputView"

+ 64 - 0
app/src/main/res/layout/edit_message_view.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+
+<merge xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+<LinearLayout
+
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:orientation = "horizontal">
+
+    <ImageView
+        android:id = "@+id/editImage"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:padding = "12dp"
+        android:src = "@drawable/ic_edit_24"
+        android:layout_gravity = "start|top"
+        app:tint="@color/colorPrimaryDark">
+
+    </ImageView>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_weight = "1"
+        android:orientation = "vertical">
+        <TextView
+            android:id = "@+id/editMessageTitle"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textColor = "@color/colorPrimaryDark"
+            android:text = "Edit Message">
+
+        </TextView>
+
+        <TextView
+            android:id = "@+id/editMessage"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:ellipsize="end"
+            android:maxLines = "1"
+            tools:text = "Edit message very very very very very very very very very very long">
+        </TextView>
+
+    </LinearLayout>
+
+    <ImageView
+        android:id = "@+id/clearEdit"
+        android:layout_width="48dp"
+        android:layout_height="48dp"
+        android:padding = "8dp"
+        android:src = "@drawable/ic_clear_24"
+        android:gravity = "top|end"
+        app:tint="@color/colorPrimaryDark">
+
+    </ImageView>
+
+</LinearLayout>
+</merge>