Ok, so AHViewPager is Great at quickly building pages that can use different views and scroll smoothly between pages
My first program used a ClearPanel On top that I had to use the Gestures Listener, and then pass events to views below based on user actions.
However, it was also very easy for me to Disable user clicks after they had pushed a view on my screen, until the view was finished doing what it needed to do (usually load a sound file and play it)
This was done by just setting a global boolean to True when the view is first sent a click event, and set to False when the view code is finished.
Any further Gestures actions recieved during the True time are immediatly rejected.
However, I cannot get this same functionality to occur with AHViewPager.
I can get it to work on initial loading of the page, so that an animation can be used after adding the AHViewPager to the activivity, (ICOS animations) by setting a global so that views check that global variable first before continuing... and the animation end trips the variable so that views will run their code.
But
When I change the global variable in the code (or try to add a clear panel above all others to intercepts click events) the user can still "push ahead" and have other views activate prior to current view finishing code.
So the code below... does not stop another btn_click from occuring...
Am I missing something obvious?
Thanks!
Ross
My first program used a ClearPanel On top that I had to use the Gestures Listener, and then pass events to views below based on user actions.
However, it was also very easy for me to Disable user clicks after they had pushed a view on my screen, until the view was finished doing what it needed to do (usually load a sound file and play it)
This was done by just setting a global boolean to True when the view is first sent a click event, and set to False when the view code is finished.
Any further Gestures actions recieved during the True time are immediatly rejected.
However, I cannot get this same functionality to occur with AHViewPager.
I can get it to work on initial loading of the page, so that an animation can be used after adding the AHViewPager to the activivity, (ICOS animations) by setting a global so that views check that global variable first before continuing... and the animation end trips the variable so that views will run their code.
But
When I change the global variable in the code (or try to add a clear panel above all others to intercepts click events) the user can still "push ahead" and have other views activate prior to current view finishing code.
So the code below... does not stop another btn_click from occuring...
B4X:
Sub btn_click
If IgnoreResponse Then
Return
End If
IgnoreResponse=True
DoEvents
... code to do animations or play sounds
DoEvents
IgnoreResponse = False
end sub
Am I missing something obvious?
Thanks!
Ross