diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt index 2d2b07a0d..1fd6a931a 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt @@ -673,7 +673,8 @@ class ChatController(args: Bundle) : } } - binding?.scrollDownButton?.setOnClickListener { binding?.messagesListView?.smoothScrollToPosition(0) } + binding?.scrollDownButton?.setOnClickListener { binding?.messagesListView?.scrollToPosition(0) } + binding?.let { viewThemeUtils.material.colorMaterialButtonPrimaryTonal(it.scrollDownButton) } binding?.let { viewThemeUtils.material.colorMaterialButtonPrimaryFilled(it.popupBubbleView) } @@ -688,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) { @@ -2445,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++ diff --git a/app/src/main/res/drawable/ic_baseline_keyboard_double_arrow_down_24.xml b/app/src/main/res/drawable/ic_keyboard_double_arrow_down.xml similarity index 57% rename from app/src/main/res/drawable/ic_baseline_keyboard_double_arrow_down_24.xml rename to app/src/main/res/drawable/ic_keyboard_double_arrow_down.xml index f4bb1a756..ba28f2e97 100644 --- a/app/src/main/res/drawable/ic_baseline_keyboard_double_arrow_down_24.xml +++ b/app/src/main/res/drawable/ic_keyboard_double_arrow_down.xml @@ -1,21 +1,26 @@ - - - + + diff --git a/app/src/main/res/layout/controller_chat.xml b/app/src/main/res/layout/controller_chat.xml index 6225d6d53..34a935ab9 100644 --- a/app/src/main/res/layout/controller_chat.xml +++ b/app/src/main/res/layout/controller_chat.xml @@ -76,8 +76,8 @@ app:incomingImageTimeTextSize="12sp" app:incomingTextColor="@color/nc_incoming_text_default" app:incomingTextLinkColor="@color/nc_incoming_text_default" - app:incomingTimeTextColor="@color/no_emphasis_text" app:incomingTextSize="@dimen/chat_text_size" + app:incomingTimeTextColor="@color/no_emphasis_text" app:incomingTimeTextSize="12sp" app:outcomingBubblePaddingBottom="@dimen/message_bubble_corners_vertical_padding" app:outcomingBubblePaddingLeft="@dimen/message_bubble_corners_horizontal_padding" @@ -100,30 +100,36 @@ android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" - android:layout_marginStart="@dimen/dialog_padding" + android:layout_marginStart="64dp" android:layout_marginTop="16dp" - android:layout_marginEnd="@dimen/dialog_padding" + 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" /> - + android:paddingStart="@dimen/standard_padding" + android:paddingEnd="@dimen/standard_padding" + android:visibility="gone" + app:cornerRadius="@dimen/button_corner_radius" + app:icon="@drawable/ic_keyboard_double_arrow_down" + app:iconPadding="0dp" + app:iconSize="24dp" /> diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 0ad8083fe..5610cf297 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -76,8 +76,4 @@ #353535 - - #141F25 - #99C3DA - diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 44fda2106..741d89889 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -102,10 +102,6 @@ #1F121212 #EEEEEE - - #E5F0F5 - #002A41 - #FFFFFF diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 613e13d1c..dc87d2034 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -163,6 +163,16 @@ 0dp + +