From 28883abe80855ea2813566f60e20f5c1b81b6127 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Mon, 13 Feb 2023 10:54:21 +0100 Subject: [PATCH] Moved chat message sending layout to specific file & fixed separator being visible upon rotation --- .../chat/fragments/DetailChatRoomFragment.kt | 6 +- .../res/layout/chat_room_detail_fragment.xml | 228 +---------------- app/src/main/res/layout/chat_room_sending.xml | 242 ++++++++++++++++++ 3 files changed, 255 insertions(+), 221 deletions(-) create mode 100644 app/src/main/res/layout/chat_room_sending.xml diff --git a/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt b/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt index eef84074f..c9711e89a 100644 --- a/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt +++ b/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt @@ -646,7 +646,7 @@ class DetailChatRoomFragment : MasterFragment + binding.setVoiceRecordingTouchListener { view, event -> if (corePreferences.holdToRecordVoiceMessage) { when (event.action) { MotionEvent.ACTION_DOWN -> { @@ -663,14 +663,14 @@ class DetailChatRoomFragment : MasterFragment + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto"> @@ -148,225 +148,17 @@ android:layout_alignTop="@id/top_bar" tools:layout="@layout/list_edit_top_bar_fragment" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + app:viewModel="@{viewModel}" + app:chatSendingViewModel="@{chatSendingViewModel}" + app:attachFileClickListener="@{attachFileClickListener}" + app:voiceRecordingTouchListener="@{voiceRecordingTouchListener}" + app:cancelReplyToClickListener="@{cancelReplyToClickListener}"/> + android:visibility="@{viewModel.remoteIsComposing ? View.VISIBLE : View.GONE, default=gone}" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file