Sub PScreen_Touch (Action As Int, x As Float, y As Float)
Select Action
Case Activity.ACTION_DOWN
startscroll = True
Case Activity.ACTION_UP 'only when make clik
startscroll = false
Case 3 'start scroll ?
.....
End Select
End Sub
Hello everybody. I use HorizontalScroolView for show some page my program, i would like center the page on the screen every times that the user scroll over 50%x, but i dont' know how intercept event when scroll finish.
Thanks. I thinked test the action panel_touch of panel on HorizontalScroolView, but haven't a end_scroll action.
You could try the attached project.
It does what you want.
It is based on Erels suggestion.
I have added the Touch event for the HorizontalScrollView, there I :
- calculate the approximate time needed to finish the scrolling
- enable a timer with the calculated time
In the Timer_Tick routine I check the ScrollPosition and according to its value set the final position.
I use this method in the ClsWheels Class.
You could try the attached project.
It does what you want.
It is based on Erels suggestion.
I have added the Touch event for the HorizontalScrollView, there I :
- calculate the approximate time needed to finish the scrolling
- enable a timer with the calculate time
In the Timer_Tick routine I check the ScrollPosition and according to its value set the final position.
I use this method in the ClsWheels Class.