Android Question Adding panels to tabstripviewpager

apty

Active Member
Licensed User
Longtime User
Please help with how i can add 5 panels to tabstripviewpager, so that i can scroll between them. My code for the panels is shown below:

B4X:
for i=0 to 4
Dim pnl As Panel
            pnl.Initialize("l")
            Dim Button1 As Button
            Dim Label1 As Label
            pnl.LoadLayout("4")

Next

The panels hold a button and a label. I want to move to next panel, until the 5th panel, with tabstripviewpager
 

DonManfred

Expert
Licensed User
Longtime User
I dont see you adding something to the tabstrip. Check the Tutorial and understand how it works.
Add your buttons and labels to Layout "4" and then

B4X:
for i=0 to 4
           TabStrip1.LoadLayout("4", "PAGE "&i)
          ' The buttons and labels inside Layout 4 are HERE useable and initialized...
Next
 
Upvote 0

apty

Active Member
Licensed User
Longtime User
thanks. it works now. Is it possible to show the indicator at the bottom instead of top?
 
Upvote 0
Top