Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d5627fe authored by Daniel Huang's avatar Daniel Huang Committed by Android (Google) Code Review
Browse files

Merge "Force keeping BottomSheetBehavior to STATE_EXPANDED" into udc-dev

parents 4381f324 5ca3547d
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -841,6 +841,19 @@ public final class KeyboardShortcutListSearch {
        BottomSheetBehavior<FrameLayout> behavior = BottomSheetBehavior.from(bottomSheet);
        behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
        behavior.setSkipCollapsed(true);
        behavior.setBottomSheetCallback(new BottomSheetBehavior.BottomSheetCallback() {
                    @Override
                    public void onStateChanged(@NonNull View bottomSheet, int newState) {
                        if (newState == BottomSheetBehavior.STATE_DRAGGING) {
                            behavior.setState(BottomSheetBehavior.STATE_EXPANDED);
                        }
                    }

                    @Override
                    public void onSlide(@NonNull View bottomSheet, float slideOffset) {
                        // Do nothing.
                    }
                });

        mKeyboardShortcutsBottomSheetDialog.setCanceledOnTouchOutside(true);
        Window keyboardShortcutsWindow = mKeyboardShortcutsBottomSheetDialog.getWindow();