Android Question ASPageview addressing views

I am trying to understand Andrew's excellent View Pager and I have run into a problem that I don't understand

If I load a series of pages with the same views (labels buttons etc) How do I address the currently shown views of the visible page

I have a panel with the views loaded on to it

B4X:
    Private ASViewPager1 As ASViewPager
    Private topPnl As B4XView
    Private lblTime As B4XView
    Private lblGreen As B4XView

In page create I have

    For i = 0 To 6
        Dim tmp_xpnl As B4XView = xui.CreatePanel("")
        tmp_xpnl.Color = xui.Color_ARGB(255,Rnd(1,255),Rnd(1,255),Rnd(1,255))
        tmp_xpnl.SetLayoutAnimated(0,0,0,ASViewPager1.Base.Width,ASViewPager1.Base.Height)
        tmp_xpnl.LoadLayout("Test")
        ASViewPager1.AddPage(tmp_xpnl,i)
    Next
    
Sub ASViewPager1_PageChanged (index As Int)
    Log("PageChanged: " & index)
    B4XPages.SetTitle(Me,"ASViewPager Example | Page " & (index +1) & "/" & ASViewPager1.Size)
    lblGreen.Text= "Test Page" (index +1)
End Sub

I suspect I might need to address them with an index but I am unsure how

Thanks for any help
 
As an update I addressed the items and changed the text programmatically but the items on the screen do not change

B4X:
    For Each v As B4XView In topPnl.GetAllViewsRecursive
        Log(v.Text)
        v.Text="Test"
    Next

The text does change (checked by logging it but there is no update on the screen

What am I missing here?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…