Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable BottomSheet Drag

Tags:

Due to my low reputation point, I can't comment. So i'm extending this question: Disabling User dragging on BottomSheet

The solution provided by Ray W works but now it expands by sliding and dragging on parent view (CoordinatorLayout).

Image

In that image, if I drag on "Unwanted Drag Area", BottomSheet slides up. How can I filtered out or stop the touch events on unwanted view?

like image 825
Fahim Avatar asked May 13 '16 06:05

Fahim


1 Answers

For the Kotlin, simply add below line in your code,

behaviour.isDraggable = false
like image 71
Jay makwana Avatar answered Sep 28 '22 02:09

Jay makwana