diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt index 9c5ae07b7f..4b2006f3df 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/ConversationActivityV2.kt @@ -100,6 +100,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe setUpInputBar() restoreDraftIfNeeded() addOpenGroupGuidelinesIfNeeded() + scrollToBottomButton.setOnClickListener { conversationRecyclerView.smoothScrollToPosition(0) } } override fun onResume() { @@ -208,6 +209,10 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe val attachmentOptionsContainerLayoutParams = attachmentOptionsContainer.layoutParams as RelativeLayout.LayoutParams attachmentOptionsContainerLayoutParams.bottomMargin = bottomMargin + attachmentButtonHeight + margin attachmentOptionsContainer.layoutParams = attachmentOptionsContainerLayoutParams + // Scroll to bottom button + val scrollToBottomButtonLayoutParams = scrollToBottomButton.layoutParams as RelativeLayout.LayoutParams + scrollToBottomButtonLayoutParams.bottomMargin = newValue + additionalContentContainer.height + toPx(12, resources) + scrollToBottomButton.layoutParams = scrollToBottomButtonLayoutParams } override fun inputBarEditTextContentChanged(newContent: CharSequence) { @@ -324,7 +329,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe val rawAlpha = (bottomOffset.toFloat() - scrollButtonNoVisibilityThreshold) / (scrollButtonFullVisibilityThreshold - scrollButtonNoVisibilityThreshold) val alpha = max(min(rawAlpha, 1.0f), 0.0f) - Log.d("Test", "$alpha") + scrollToBottomButton.alpha = alpha } // endregion diff --git a/app/src/main/res/drawable/view_scroll_to_bottom_button_background.xml b/app/src/main/res/drawable/view_scroll_to_bottom_button_background.xml new file mode 100644 index 0000000000..512b3861a7 --- /dev/null +++ b/app/src/main/res/drawable/view_scroll_to_bottom_button_background.xml @@ -0,0 +1,7 @@ + + + + + diff --git a/app/src/main/res/layout/activity_conversation_v2.xml b/app/src/main/res/layout/activity_conversation_v2.xml index 77139866a6..a975516701 100644 --- a/app/src/main/res/layout/activity_conversation_v2.xml +++ b/app/src/main/res/layout/activity_conversation_v2.xml @@ -1,6 +1,6 @@ - + + + + + + #FCFCFC #DFDFDF #0F000000 + #FCFCFC + #99000000 #ffffff #fcfcfc diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 86f18d6d60..fa24a3ecee 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -36,6 +36,8 @@ #171717 #0C0C0C #000000 + #171717 + #99FFFFFF #5ff8b0