修改已读未读判断逻辑

选择框外部可以点击
This commit is contained in:
ningwenqiang
2024-08-27 18:01:03 +08:00
parent 6abe02390e
commit ba47239e12
8 changed files with 314 additions and 218 deletions

View File

@@ -2,7 +2,8 @@
<androidx.constraintlayout.widget.ConstraintLayout 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="360dp"
android:id="@+id/root"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:background="@drawable/shape_white">
@@ -10,8 +11,8 @@
android:id="@+id/chatTypeTv1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginStart="24dp"
android:layout_marginTop="22dp"
android:layout_weight="1"
android:text="@string/all_chats"
android:textColor="#777777"
@@ -26,6 +27,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="20dp"
android:padding="5dp"
android:src="@mipmap/ic_chat_type_unselect"
app:layout_constraintBottom_toBottomOf="@+id/chatTypeTv1"
app:layout_constraintEnd_toEndOf="parent"
@@ -37,8 +39,8 @@
android:id="@+id/chatTypeTv2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginStart="24dp"
android:layout_marginTop="22dp"
android:layout_weight="1"
android:text="@string/online_only"
android:textColor="#777777"
@@ -51,6 +53,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="5dp"
android:src="@mipmap/ic_chat_type_unselect"
app:layout_constraintBottom_toBottomOf="@+id/chatTypeTv2"
app:layout_constraintEnd_toEndOf="@+id/chatTypeImg1"
@@ -61,8 +64,8 @@
android:id="@+id/chatTypeTv3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginStart="24dp"
android:layout_marginTop="22dp"
android:layout_weight="1"
android:text="@string/offline_only"
android:textColor="#777777"
@@ -75,6 +78,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="5dp"
android:src="@mipmap/ic_chat_type_unselect"
app:layout_constraintBottom_toBottomOf="@+id/chatTypeTv3"
app:layout_constraintEnd_toEndOf="@+id/chatTypeImg1"
@@ -85,8 +89,8 @@
android:id="@+id/chatTypeTv4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginStart="24dp"
android:layout_marginTop="22dp"
android:layout_weight="1"
android:text="@string/read_only"
android:textColor="#777777"
@@ -99,6 +103,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="5dp"
android:src="@mipmap/ic_chat_type_unselect"
app:layout_constraintBottom_toBottomOf="@+id/chatTypeTv4"
app:layout_constraintEnd_toEndOf="@+id/chatTypeImg1"
@@ -109,8 +114,8 @@
android:id="@+id/chatTypeTv5"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="20dp"
android:layout_marginTop="20dp"
android:layout_marginStart="24dp"
android:layout_marginTop="22dp"
android:layout_marginBottom="20dp"
android:layout_weight="1"
android:text="@string/unread_only"
@@ -125,6 +130,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:padding="5dp"
android:src="@mipmap/ic_chat_type_unselect"
app:layout_constraintBottom_toBottomOf="@+id/chatTypeTv5"
app:layout_constraintEnd_toEndOf="@+id/chatTypeImg1"

View File

@@ -1477,8 +1477,8 @@ Limited ride And limited avatar frame</string>
<string name="message_chat_msg_read_tip">[Read]</string>
<string name="message_chat_msg_unread_tip">[Unread]</string>
<string name="all_chats">All Chats</string>
<string name="online_only">Show Online Only</string>
<string name="offline_only">Show Offline Only</string>
<string name="read_only">Show Read Only</string>
<string name="unread_only">Show Unread Only</string>
<string name="online_only">Show Online </string>
<string name="offline_only">Show Offline </string>
<string name="read_only">Show Read </string>
<string name="unread_only">Show Unread </string>
</resources>

View File

@@ -1415,8 +1415,8 @@ Limited ride And limited avatar frame</string>
<string name="message_chat_msg_read_tip">[Read]</string>
<string name="message_chat_msg_unread_tip">[Unread]</string>
<string name="all_chats">All Chats</string>
<string name="online_only">Show Online Only</string>
<string name="offline_only">Show Offline Only</string>
<string name="read_only">Show Read Only</string>
<string name="unread_only">Show Unread Only</string>
<string name="online_only">Show Online </string>
<string name="offline_only">Show Offline </string>
<string name="read_only">Show Read </string>
<string name="unread_only">Show Unread </string>
</resources>