Android Question Creating an Advert Banner

Kope

Active Member
Licensed User
Longtime User
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
 

Alexander Stolte

Expert
Licensed User
Longtime User
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
How do i set auto play on this
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
 
Upvote 0
Top