A apty Active Member Licensed User Longtime User Nov 6, 2018 #1 I am creating panels programmatically like below: Code: for i=0 to 9 dim pnl as Panel pnl.initialize("") next How can i add these panels to tabstripviewpager so that i swipe through all (10) of them?
I am creating panels programmatically like below: Code: for i=0 to 9 dim pnl as Panel pnl.initialize("") next How can i add these panels to tabstripviewpager so that i swipe through all (10) of them?
DonManfred Expert Licensed User Longtime User Nov 6, 2018 #2 https://www.b4x.com/android/forum/threads/tabstripviewpager-better-viewpager.63975/ Code: TabStrip1.LoadLayout("Page1", "PAGE 1") ' Page1 is the layout loaded here... Upvote 0
https://www.b4x.com/android/forum/threads/tabstripviewpager-better-viewpager.63975/ Code: TabStrip1.LoadLayout("Page1", "PAGE 1") ' Page1 is the layout loaded here...
A apty Active Member Licensed User Longtime User Nov 6, 2018 #3 The panels are generated in code and are to be added to the tabstripviewpager. Code: TabStrip1.LoadLayout("Page1", "PAGE 1") requires a layout created in designer, if i am not wrong. My layouts are panels created in code Upvote 0
The panels are generated in code and are to be added to the tabstripviewpager. Code: TabStrip1.LoadLayout("Page1", "PAGE 1") requires a layout created in designer, if i am not wrong. My layouts are panels created in code
DonManfred Expert Licensed User Longtime User Nov 6, 2018 #4 yes. You can use layouts with just a panel. load the content to the panel afterwards. Upvote 0
A apty Active Member Licensed User Longtime User Nov 6, 2018 #5 If i use the panel as layout, the app crashes with an exception that file is not found, because it is looking for layout file. Code: For i=0 To 10 Dim pnlx As Panel pnlx.Initialize("") pnlx.Color=Colors.red TabStrip1.LoadLayout(pnlx,"") 'this causes the app to crash as it expects a layout file Next Upvote 0
If i use the panel as layout, the app crashes with an exception that file is not found, because it is looking for layout file. Code: For i=0 To 10 Dim pnlx As Panel pnlx.Initialize("") pnlx.Color=Colors.red TabStrip1.LoadLayout(pnlx,"") 'this causes the app to crash as it expects a layout file Next
DonManfred Expert Licensed User Longtime User Nov 6, 2018 #6 You need to USE a erxisting layout file for sure! Learn how it works! It is easy to later change the panels content. (In your loop). The pooint is to understand how it works. Upvote 0
You need to USE a erxisting layout file for sure! Learn how it works! It is easy to later change the panels content. (In your loop). The pooint is to understand how it works.
A apty Active Member Licensed User Longtime User Nov 6, 2018 #7 ok thanks.Seems its hard with tabstrip. The idea is for the panels to each hold several buttons and then scroll through these panels horizontally. All these is done in code without layout file. For now i can use scrollview though in this case the scrolling is vertical Upvote 0
ok thanks.Seems its hard with tabstrip. The idea is for the panels to each hold several buttons and then scroll through these panels horizontally. All these is done in code without layout file. For now i can use scrollview though in this case the scrolling is vertical