0

I have a BottomSheetDialogFragment layout with a constraint layout and the constraint layout has a NumberPicker. NumberPicker scrolls okay, but if the user scrolls outside of the picker, the BottomSheet moves which I do not want. How do I stop this.enter image description here

Basically, when the user drag on the white part, I do not want the BottomSheetDialogFragment to be dragged down.

Please let me know if you have the solution.

Thanks.

Community
  • 1
  • 1
sadat
  • 4,004
  • 2
  • 29
  • 49
  • Make your scrollable views cover areas until end on left and right side, or put some empty views on those white part which does consume event but do nothing. – mnp343 Aug 16 '18 at 03:45
  • Possible duplicate of [Disabling User dragging on BottomSheet](https://stackoverflow.com/questions/35794264/disabling-user-dragging-on-bottomsheet) – ADM Aug 16 '18 at 04:12
  • @ADM it's completely different. – sadat Aug 16 '18 at 13:05
  • I'm trying to achieve a similar UI that has a bottomSheetDialogFragment with a NumberPicker. Could you please point me to some code on how to achieve this? – Vishy Mar 18 '21 at 23:14

0 Answers0