2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00

[fenix] No issue: Fix QAB handle lingering onscreen (https://github.com/mozilla-mobile/fenix/pull/2244)

This commit is contained in:
Colin Lee 2019-05-02 16:25:17 -05:00 committed by GitHub
parent 87a5ebc722
commit 5d4f29c33f

View File

@ -173,13 +173,15 @@ class QuickActionSheetBehavior(
private fun repositionQuickActionSheet(quickActionSheetContainer: NestedScrollView, toolbar: BrowserToolbar) {
val handleHeight = quickActionSheetContainer.findViewById<ImageButton>(R.id.quick_action_sheet_handle).height
if (toolbar.translationY >= toolbar.height.toFloat() - POSITION_SNAP_BUFFER) {
quickActionSheetContainer.translationY = toolbar.translationY + toolbar.height * -1.0f + handleHeight
peekHeight = handleHeight
state = STATE_COLLAPSED
return
} else if (state == STATE_HIDDEN || state == STATE_SETTLING) {
peekHeight = handleHeight
state = STATE_COLLAPSED
}
quickActionSheetContainer.translationY = (toolbar.translationY + toolbar.height * -1.0).toFloat()
quickActionSheetContainer.translationY = toolbar.translationY + toolbar.height * -1.0f
}
}