On my app I've got a full screen CustomListView I'm using vertically and adding panels to, much like the cards in the tutorial example.
What I need to have however is the ability to swipe left and right on that CLV and cause it to load in a different set of panels.
I've added a GestureDetector object and whilst that works fine capturing the 'fling' event on a temporary static panel I added to the top of the screen. So I know I'm using that correctly.
However I can't get the GestureDetector to work on the CLV or any of the Views I add to it. I've tried doing what the GestureDetector example does and adding the whole Activity as a listener. That didn't seem to do anything. CLV's can't be added as listeners. I tried adding the GestureDetector to the different Views I add to my CLV. The panels I'm adding have a few different labels and an ImageView on them. I added the GestureDetector to all of them but it's not really working. Ever so often some fling events get captured but mostly they don't. I've two theories why:
1. the Views are fairly small and therefore there isn't enough space 'in them' for a fling to be correctly interpreted
2. the CLV seems to read almost any motion happening as a vertical scroll and it captures that touch event. (Hence my title of this thread)
Ideally I need something that for the whole activity, no matter what View is being touched, a swipe or fling event will be captured by my GestureDetector.
Is there any way to make the GestureDetector the top priority for touch events?
Thanks.
What I need to have however is the ability to swipe left and right on that CLV and cause it to load in a different set of panels.
I've added a GestureDetector object and whilst that works fine capturing the 'fling' event on a temporary static panel I added to the top of the screen. So I know I'm using that correctly.
However I can't get the GestureDetector to work on the CLV or any of the Views I add to it. I've tried doing what the GestureDetector example does and adding the whole Activity as a listener. That didn't seem to do anything. CLV's can't be added as listeners. I tried adding the GestureDetector to the different Views I add to my CLV. The panels I'm adding have a few different labels and an ImageView on them. I added the GestureDetector to all of them but it's not really working. Ever so often some fling events get captured but mostly they don't. I've two theories why:
1. the Views are fairly small and therefore there isn't enough space 'in them' for a fling to be correctly interpreted
2. the CLV seems to read almost any motion happening as a vertical scroll and it captures that touch event. (Hence my title of this thread)
Ideally I need something that for the whole activity, no matter what View is being touched, a swipe or fling event will be captured by my GestureDetector.
Is there any way to make the GestureDetector the top priority for touch events?
Thanks.