Skip to content

Commit

Permalink
[Catalog][BottomSheet] Disable drag handle when restricting expansion
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 462453123
(cherry picked from commit c9e855e)
  • Loading branch information
drchen committed Aug 4, 2022
1 parent 95e585c commit d4da5b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
android:layout_height="600dp">

<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:id="@+id/drag_handle"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>

Expand Down

0 comments on commit d4da5b1

Please sign in to comment.