Browse Source

ensure buttons won't overlap

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 2 năm trước cách đây
mục cha
commit
5dfbb83375

+ 2 - 1
app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt

@@ -689,7 +689,7 @@ class ChatController(args: Bundle) :
                     if (layoutManager!!.findFirstCompletelyVisibleItemPosition() > 0) {
                         binding?.scrollDownButton?.visibility = View.VISIBLE
                     } else {
-                        binding?.scrollDownButton?.visibility = View.INVISIBLE
+                        binding?.scrollDownButton?.visibility = View.GONE
                     }
 
                     if (newMessagesCount != 0 && layoutManager != null) {
@@ -2446,6 +2446,7 @@ class ChatController(args: Bundle) :
         if (!shouldAddNewMessagesNotice && !shouldScroll) {
             if (!binding?.popupBubbleView?.isShown!!) {
                 newMessagesCount = 1
+                binding?.scrollDownButton?.visibility = View.GONE
                 binding?.popupBubbleView?.show()
             } else if (binding?.popupBubbleView?.isShown!!) {
                 newMessagesCount++

+ 3 - 1
app/src/main/res/layout/controller_chat.xml

@@ -105,8 +105,10 @@
             android:layout_marginEnd="64dp"
             android:layout_marginBottom="16dp"
             android:minHeight="@dimen/min_size_clickable_area"
+            android:layout_toStartOf="@+id/scrollDownButton"
             android:text="@string/nc_new_messages"
             app:background="@color/colorPrimary"
+            android:ellipsize="middle"
             app:cornerRadius="@dimen/button_corner_radius"
             app:icon="@drawable/ic_baseline_arrow_downward_24px" />
 
@@ -123,7 +125,7 @@
             android:contentDescription="@string/scroll_to_bottom"
             android:paddingStart="@dimen/standard_padding"
             android:paddingEnd="@dimen/standard_padding"
-            android:visibility="visible"
+            android:visibility="gone"
             app:cornerRadius="@dimen/button_corner_radius"
             app:icon="@drawable/ic_keyboard_double_arrow_down"
             app:iconPadding="0dp"