Closed BobOtike closed 8 years ago
I just checked and it looks like you're right! That's my fault. I'll try and get that fixed for you today.
Thank you, I appreciate it and look forward to trying the fix.
Let me know how it works. If there's a problem I'll reopen.
Thanks for taking care of this this so fast!
The problem I described before is gone now, but another one has arisen:
I use a TouchScrollBar
with autoHide = true
and respondToTouchIfHidden = false
. Before your fix, the ScrollBar would intercept the TouchEvent
s on the buttons while it was hidden, which is now not a problem anymore. I'm using barThickness = 25
and when the ScrollBar is not hidden, it is almost impossible to use it for scrolling since the area it reacts to touches in is so small. Maybe you can see for yourself with that value.
What first comes to mind as a solution would be to differentiate between hidden and not hidden state: when the ScrollBar is hidden it uses your fix but when visible it falls back to the original thickness to intercept TouchEvent
s.
I don't know if that is something you would implement, maybe that is too specific for my exact case, but I would love to hear your thought on that matter.
Hi @krimin-killr21,
have you given this issue some thought?
I noticed in the code that the OnTouchListener
in the TouchScrollBar
only returns false
when the ScrollBar has been explicitly hidden by the user. IMHO it should also return false
when hidden == true
and respondToTouch == false
.
It think it makes no sense to consume the TouchEvent
when the ScrollBar isn't going to react to it. This way my issue would also be fixed. The buttons get all their TouchEvent
s when the ScrollBar is hidden and when it is not I can simply use a greater thickness to ensure it is easy to scroll.
First of all, this is a great library and thank you for making it.
I have a use case where the items in my
RecyclerView
feature a button on the right side to show a popupMenu. I already adjusted the thickness of theTouchScrollBar
usingsetBarThickness
so that it fits into the margin between the button's right edge and the screen's edge, but it still seems to intercept touches on my buttons. This lead me to the conclusion, that reducing the thickness only reduces the visible size of theTouchScrollBar
but not the thickness of the zone where it actually interceptsTouchEvent
s.Correct me if I'm wrong and if not: is there a way to reduce that thickness likewise?
Thanks in advance, cheers!