I've got a weird bug and I have no idea where to a...
# android
r
I've got a weird bug and I have no idea where to ask, so I'll just try here. I'm making a custom layout. So I've got a class extending
ViewGroup
. I basically want to reproduce the little player in the Youtube app, but not exactly. I reimplemented a
ViewDragHelper
as the Android one sucks and doesn't support anything. Now to the problem. Basically, when I scroll on a view which doesn't "support scrolling" from the layout's point of view, it triggers a click. As an example, take the Youtube app with the player opened in portrait mode. This is exactly what my test app looks like. Now imagine you scroll horizontally on the player. Nothing should happen right? It's a scroll, there's nothing to scroll, nothing happens. In my case, it triggers a click. Like I put my finger on the vertical middle of the view, on the far left, move to the right end of the screen, and it triggers a click on the view I just basically scrolled in. Is this normal Android behaviour? What am I doing wrong? When this thing happened, my
ViewDragHelper
basically returns false for every
onInterceptTouchEvent
and
onTouchEvent
my
ViewGroup
subclass receives, so the contained view should just receive the event. Why does it trigger a click?