Commit 0899941f authored by Sanchaai Mathiyarasan's avatar Sanchaai Mathiyarasan
Browse files

Bug 1907086 - Implement the max height of the menu. r=android-reviewers,petru

When expanded, the height of the menu should match the Figma specifications as mentioned here:
https://www.figma.com/design/RFz9fYtotQCQuinwcZujZt/Menu-Redesign?node-id=15937-406408&t=q4Tbc8EJllfh5xF0-4

Differential Revision: https://phabricator.services.mozilla.com/D217864
parent 271f3b10
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ import org.mozilla.fenix.utils.exitSubmenu
// three states instead of the expected two states required by design.
private const val PEEK_HEIGHT = 460
private const val EXPANDED_MIN_RATIO = 0.0001f
private const val TOP_EXPANDED_OFFSET = 80
private const val EXPANDED_OFFSET = 80
private const val HIDING_FRICTION = 0.9f

/**
@@ -111,7 +111,7 @@ class MenuDialogFragment : BottomSheetDialogFragment() {
                    isFitToContents = true
                    peekHeight = PEEK_HEIGHT.dpToPx(resources.displayMetrics)
                    halfExpandedRatio = EXPANDED_MIN_RATIO
                    expandedOffset = TOP_EXPANDED_OFFSET
                    maxHeight = resources.displayMetrics.heightPixels - EXPANDED_OFFSET.dpToPx(resources.displayMetrics)
                    state = BottomSheetBehavior.STATE_COLLAPSED
                    hideFriction = HIDING_FRICTION
                }