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 8adb21a0da..a601ded293 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 @@ -12,6 +12,7 @@ import android.view.Menu import android.view.MenuItem import android.view.MotionEvent import android.widget.RelativeLayout +import androidx.core.view.marginBottom import androidx.loader.app.LoaderManager import androidx.loader.content.Loader import androidx.recyclerview.widget.LinearLayoutManager @@ -154,6 +155,12 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe val recyclerViewLayoutParams = conversationRecyclerView.layoutParams as RelativeLayout.LayoutParams recyclerViewLayoutParams.bottomMargin = newValue conversationRecyclerView.layoutParams = recyclerViewLayoutParams + val attachmentButtonHeight = inputBar.attachmentsButtonContainer.height + val bottomMargin = (newValue - attachmentButtonHeight) / 2 + val margin = toPx(8, resources) + val attachmentOptionsContainerLayoutParams = attachmentOptionsContainer.layoutParams as RelativeLayout.LayoutParams + attachmentOptionsContainerLayoutParams.bottomMargin = bottomMargin + attachmentButtonHeight + margin + attachmentOptionsContainer.layoutParams = attachmentOptionsContainerLayoutParams } override fun toggleAttachmentOptions() { diff --git a/app/src/main/res/layout/activity_conversation_v2.xml b/app/src/main/res/layout/activity_conversation_v2.xml index d5fcbc49f4..240044d57c 100644 --- a/app/src/main/res/layout/activity_conversation_v2.xml +++ b/app/src/main/res/layout/activity_conversation_v2.xml @@ -12,7 +12,14 @@ android:layout_height="match_parent" android:layout_marginBottom="@dimen/input_bar_height" /> + + - -