Have been trying to create a banner with images from my server (eg www.xx.com/a.jpg). Am using mySQL. The images on the banner will be changing within 2 seconds. I tried using [B4X] AS ViewPager - Auto Play but couldn't get it woking.
Please i need help. I know it's possible but can't figure it out
In this example project you can see how to add an auto play feautre to the AS ViewPager. https://www.b4x.com/android/forum/threads/b4x-xui-as-viewpager-based-on-xcustomlistview.116709/ Sub Class_Globals Private tmr_AutoPlay As Timer End Sub Private Sub B4XPage_Created (Root1 As B4XView)...
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