In this example project you can see how to add an auto play feautre to the AS ViewPager.
[B4X] [XUI] AS ViewPager based on xCustomListView
Hey, thanks to @KZero for his good zPager class, i was able to extract a few things from it to make this cross platform view. I spend a lot of time in creating views, some views i need by my self, but some views not and to create a high quality view cost a lot of time. If you want to support...
www.b4x.com
B4X:
Sub Class_Globals
Private tmr_AutoPlay As Timer
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
tmr_AutoPlay.Initialize("tmr_AutoPlay",2000)'2 seconds
tmr_AutoPlay.Enabled = True
End Sub
Private Sub tmr_AutoPlay_Tick
If ASViewPager1.CurrentIndex = ASViewPager1.Size -1 Then
ASViewPager1.CurrentIndex2 = 0
Else
ASViewPager1.NextPage
End If
End Sub
Attachments
Last edited: