Android Question stdViewPager and Activity.ACTION_MOVE

jabc

Member
Licensed User
Longtime User
Hello,

I have designed an application with multiple pages using Erel's sliding panels demonstration.
In one of the panel I have a rotary button (control knob) that the code is handling through Activity.ACTION_MOVE.

I would like to implement the stdViewPager because it is much smoother and gives a better user experience.
I have modified my code for the stdPageViewer, very simple to use thanks. But I am now facing a problem between the actions on the knob and the pages swipe.

If I start the rotation on my object at 3 o'clock or 9 o'clock (vertically) my control works well.
If I start at 12 o'clock or 6 o'clock (horizontally), the gesture is considered as page swipe, as I can understand.

Would it be possible to prevent page swipe gesture above a defined area ?

Thanks,

Jerome
 

jabc

Member
Licensed User
Longtime User
dear Erel,

I am handling the touch function via the Panels_touch event.


Private vp As StdViewPager
vp.Initialize("vp", 4, 100%x, 100%y)
Activity.AddView(vp.AsView, 0, 0, 100%x, 100%y)
vp.panels(0).Initialize("panels")

...

Sub Panels_Touch (Action As Int, X As Float, Y As Float)

Select Action
Case Activity.ACTION_DOWN


Are you talking about this panel touch event ?

Thanks

Jerome
 
Upvote 0

jabc

Member
Licensed User
Longtime User
I made a test application representing only the knob and the viewpager.
I then modified it so that the knob is included inside a panel, and the touch function is related to this sub panel.

I do not see any difference, swiping horizontally change page instead of changing the volume.

I attach both versions to show the behavior. I have placed a label with a numeric value, rotating the know changes the value.

Is there any way we can set a high priority of the touch event on the panel than on the viewpager ?

Thanks
 

Attachments

  • archive_test_swipe_basic.zip
    6.5 KB · Views: 294
  • archive_test_swipe_with_panel.zip
    6.6 KB · Views: 319
Upvote 0
Top