From d4da5b10a38b126f9503ddefcd9bb7bd61c1baff Mon Sep 17 00:00:00 2001 From: conradchen Date: Thu, 21 Jul 2022 20:06:55 +0000 Subject: [PATCH] [Catalog][BottomSheet] Disable drag handle when restricting expansion PiperOrigin-RevId: 462453123 (cherry picked from commit c9e855e7d930c7720fd01bb7a70148dde38b93e7) --- .../catalog/bottomsheet/BottomSheetMainDemoFragment.java | 2 ++ .../catalog/bottomsheet/res/layout/cat_bottomsheet_content.xml | 1 + 2 files changed, 3 insertions(+) diff --git a/catalog/java/io/material/catalog/bottomsheet/BottomSheetMainDemoFragment.java b/catalog/java/io/material/catalog/bottomsheet/BottomSheetMainDemoFragment.java index 48d77cde799..894b3dbd59f 100644 --- a/catalog/java/io/material/catalog/bottomsheet/BottomSheetMainDemoFragment.java +++ b/catalog/java/io/material/catalog/bottomsheet/BottomSheetMainDemoFragment.java @@ -109,6 +109,8 @@ public View onCreateDemoView( restrictExpansionSwitch.setOnCheckedChangeListener( (buttonView, isChecked) -> { fullScreenSwitch.setEnabled(!isChecked); + view.findViewById(R.id.drag_handle).setEnabled(!isChecked); + bottomSheetInternal.findViewById(R.id.drag_handle).setEnabled(!isChecked); updateBottomSheetHeights(); }); diff --git a/catalog/java/io/material/catalog/bottomsheet/res/layout/cat_bottomsheet_content.xml b/catalog/java/io/material/catalog/bottomsheet/res/layout/cat_bottomsheet_content.xml index 6d86bfb9ed6..b86c20586ff 100644 --- a/catalog/java/io/material/catalog/bottomsheet/res/layout/cat_bottomsheet_content.xml +++ b/catalog/java/io/material/catalog/bottomsheet/res/layout/cat_bottomsheet_content.xml @@ -21,6 +21,7 @@ android:layout_height="600dp">