tiper / MaterialSpinner

Implementation of a Material Spinner for Android with TextInputLayout functionalities
Apache License 2.0
130 stars 30 forks source link

How to stop dragging up/down the bottom sheet while scrolling up/down? #11

Open hassan31 opened 4 years ago

hassan31 commented 4 years ago

Hi, I'm experiencing one more issue regarding scrolling up/down of bottom sheet. When I scroll up, the bottom sheet is dragged upward and coves the whole fragment/activity. Instead, I want to restrict the dragging of the sheet if I do scroll up/down.

Let say I've 100 items in the list and I've scrolled up all the items and I'm now at last item in the sheet, now when I scroll down the sheet is dragged downwards instead of scrolling down and in this way the sheet is dismissed and I'm unable to scroll down the items.

Can you please let me know if the solution of these issues already exist in the current code or you have to implement these?

Waiting for your reply. Let me know if you need any further clarifications regarding my issue.

Kind Regards, Hassan

tiper commented 4 years ago

Hi @hassan31 MaterialSpinner uses the BottomSheetDialog I that what you are describing is the normal behaviour.

To achieve the desired behaviour you would need to implement a new SpinnerPopup with your own custom behaviour and add a new mode to the spinner.

If you do so please consider opening a pull request, contributions are welcome 😄