From be98ff35089fb58d3f9d0c88b8b393210c741eb3 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Fri, 7 Oct 2022 11:51:05 -0400 Subject: [PATCH] Fix bottom bar color in group story selector. --- .../v2/stories/ChooseGroupStoryBottomSheet.kt | 16 ++-- .../stories_choose_group_bottom_bar.xml | 79 ++++++++++--------- 2 files changed, 50 insertions(+), 45 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/mediasend/v2/stories/ChooseGroupStoryBottomSheet.kt b/app/src/main/java/org/thoughtcrime/securesms/mediasend/v2/stories/ChooseGroupStoryBottomSheet.kt index f8cbb1cc0..e2e7c72ea 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mediasend/v2/stories/ChooseGroupStoryBottomSheet.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/mediasend/v2/stories/ChooseGroupStoryBottomSheet.kt @@ -32,10 +32,9 @@ class ChooseGroupStoryBottomSheet : FixedRoundedCornerBottomSheetDialogFragment( const val RESULT_SET = "groups" } - private lateinit var confirmButton: View - private lateinit var selectedList: RecyclerView private lateinit var divider: View private lateinit var mediator: ContactSearchMediator + private lateinit var innerContainer: View private var animatorSet: AnimatorSet? = null @@ -49,13 +48,14 @@ class ChooseGroupStoryBottomSheet : FixedRoundedCornerBottomSheetDialogFragment( val container = view.parent.parent.parent as FrameLayout val bottomBar = LayoutInflater.from(requireContext()).inflate(R.layout.stories_choose_group_bottom_bar, container, true) - confirmButton = bottomBar.findViewById(R.id.share_confirm) - selectedList = bottomBar.findViewById(R.id.selected_list) + innerContainer = bottomBar.findViewById(R.id.inner_container) divider = bottomBar.findViewById(R.id.divider) val adapter = ShareSelectionAdapter() + val selectedList: RecyclerView = bottomBar.findViewById(R.id.selected_list) selectedList.adapter = adapter + val confirmButton: View = bottomBar.findViewById(R.id.share_confirm) confirmButton.setOnClickListener { onDone() } @@ -116,8 +116,7 @@ class ChooseGroupStoryBottomSheet : FixedRoundedCornerBottomSheetDialogFragment( animatorSet?.cancel() animatorSet = AnimatorSet().apply { playTogether( - ObjectAnimator.ofFloat(confirmButton, View.TRANSLATION_Y, 0f), - ObjectAnimator.ofFloat(selectedList, View.TRANSLATION_Y, 0f), + ObjectAnimator.ofFloat(innerContainer, View.TRANSLATION_Y, 0f), ObjectAnimator.ofFloat(divider, View.TRANSLATION_Y, 0f) ) start() @@ -125,13 +124,12 @@ class ChooseGroupStoryBottomSheet : FixedRoundedCornerBottomSheetDialogFragment( } private fun animateOutBottomBar() { - val translationY = DimensionUnit.SP.toPixels(64f) + val translationY = DimensionUnit.SP.toPixels(68f) animatorSet?.cancel() animatorSet = AnimatorSet().apply { playTogether( - ObjectAnimator.ofFloat(confirmButton, View.TRANSLATION_Y, translationY), - ObjectAnimator.ofFloat(selectedList, View.TRANSLATION_Y, translationY), + ObjectAnimator.ofFloat(innerContainer, View.TRANSLATION_Y, translationY), ObjectAnimator.ofFloat(divider, View.TRANSLATION_Y, translationY) ) start() diff --git a/app/src/main/res/layout/stories_choose_group_bottom_bar.xml b/app/src/main/res/layout/stories_choose_group_bottom_bar.xml index 9c1e40e3d..d0fb6cf77 100644 --- a/app/src/main/res/layout/stories_choose_group_bottom_bar.xml +++ b/app/src/main/res/layout/stories_choose_group_bottom_bar.xml @@ -1,53 +1,60 @@ - + android:layout_gravity="bottom" + android:orientation="vertical"> + - + - + - \ No newline at end of file + + +