B4i Library TabStrip

Status
Not open for further replies.
iTabStrip library implements a controller similar to B4A TabStripViewPager.
It is based on XLPagerTabStrip: https://github.com/xmartlabs/XLPagerTabStrip (MIT license).

tabstrip.gif

Setup instructions:

1. Add TabStrip with the designer.
2. Create the tab pages layouts. Make sure to use anchors to allow the layouts to fill the available space.
3. Set the pages by calling TabStrip.SetPages.
4. You need to put the ButtonCell.xip file under Files\Special. You can find the file in the example project.

The title used is the Page's title or the attributed text of a label that is set as the page's TitleView.

Workaround to issue with devices with notch (all new devices): https://www.b4x.com/android/forum/threads/white-bar-on-iphone-xs.107514/#post-672963
 

Attachments

  • TabStripExample.zip
    112.5 KB · Views: 508
  • iTabStrip.zip
    479 KB · Views: 441
Last edited:

walterf25

Expert
Licensed User
Longtime User
iTabStrip library implements a controller similar to B4A TabStripViewPager.
It is based on XLPagerTabStrip: https://github.com/xmartlabs/XLPagerTabStrip (MIT license).

View attachment 56317

Setup instructions:

1. Add TabStrip with the designer.
2. Create the tab pages layouts. Make sure to use anchors to allow the layouts to fill the available space.
3. Set the pages by calling TabStrip.SetPages.
4. You need to put the ButtonCell.xip file under Files\Special. You can find the file in the example project.

The title used is the Page's title or the attributed text of a label that is set as the page's TitleView.
When loading a layout on any of the tabs of the TabStrip, there's always a space between the bottom of the Tab and the loaded layout, is there a way to get rid of that gap?

Walter
 

walterf25

Expert
Licensed User
Longtime User

Daniele Zanoni

Member
Licensed User
Longtime User
Dear Erel,
I have a problem using B4XDrawer + TabStrip in B4i
When I load a layout page containig the TabStrip control the application crash.
Looking inside Files\Special before compiling i have 4 files, after compiling 3 files.
I think that TabStrip crash because need the file deleted. but why the compiler delete it ?

1583247327432.png1583247638054.png
Replacing the page containig TabStrip control with another layout page the application run correctly, and B4XDrawer works too coorectly.

Daniele
 
Status
Not open for further replies.
Top