B4A Library [B4X] [XUI] AS SegmentedTab

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.15
    • Add AddTab2
    • Add GetValue
    • Add Value to Type ASSegmentedTab_Tab
Examples
B4X:
ASSegmentedTab1.AddTab2("Option 1",Null,"Value1")
ASSegmentedTab1.AddTab2("Option 2",Null,"Value2")
ASSegmentedTab1.AddTab2("Option 3",Null,"Value3")
B4X:
ASSegmentedTab1.GetValue(0)
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.16
    • Add Designer Property SelectionTextColor
    • Add SelectionTextColor to Type ASSegmentedTab_ItemTextProperties
B4X:
ASSegmentedTab1.ItemTextProperties.SelectedTextColor = xui.Color_Blue
ASSegmentedTab1.RefreshTabs
 

Rubsanpe

Active Member
Licensed User
Hello CreateASSegmentedTab_ItemTextProperties documentation needs to be updated with the new SelectionTextColor parameter.

Rubén
 

Rubsanpe

Active Member
Licensed User
Thank you. I was talking about the first post documentation. SelectionTextColor parameter is not present.

Rubén
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 1.19
    • Add AddTabAdvanced - Add a tab with the ASSegmentedTab_Tab type
    • Add Width to the ASSegmentedTab_Tab type
      • It's a optional tab property
      • If 0, then the width of the tab is calculated automatically
      • Default: 0
B4X:
    Dim Tab1 As ASSegmentedTab_Tab
    Tab1.Initialize
    Tab1.Icon = ASSegmentedTab3.FontToBitmap(Chr(0xE068),True,15,xui.Color_White)
    Tab1.Width = 40dip
    ASSegmentedTab3.AddTabAdvanced(Tab1)

    ASSegmentedTab3.AddTab("Inizio",Null)
    ASSegmentedTab3.AddTab("Fine Prova",Null)
 

Alexander Stolte

Expert
Licensed User
Longtime User
Update
  • 2.00
    • BugFixes and Improvements
    • New RemoveTab and RemoveTab2
    • New get and set BackgroundColor
    • New get and set SelectionColor
    • New RebuildTabs - Removes all tabs And adds them again
    • New "Enabled" to ASSegmentedTab_Tab type
      • please check if enabled = true is set when using AddTabAdvanced
    • New Event DisabledTabClicked - Is triggered when the user clicks on a deactivated tab
    • New Designer Property HapticFeedback
      • Default: False
    • New Themes - You can now switch to Light or Dark mode
    • New set Theme
    • New get Theme_Dark
    • New get Theme_Light
    • New Designer Property ThemeChangeTransition
      • Default: None
The long-awaited V2 is finally here and offers some modernizations and long overdue functions.



Theme
Simply switch between Dark and Light mode
B4X:
ASSegmentedTab1.Theme = ASSegmentedTab1.Theme_Light
B4X:
ASSegmentedTab1.Theme = ASSegmentedTab1.Theme_Dark

Deactivate tabs
You can now deactivate individual tabs, which can no longer be tapped by the user.
When the user clicks on a disabled tab, the new DisabledTabClicked event is triggered and you can react to it if you want.
B4X:
ASSegmentedTab1.AddTab("Test",Null).Enabled = False
or
B4X:
ASSegmentedTab1.GetTab(0).Enabled = False
ASSegmentedTab1.RefreshTabs

Remove tabs
Remove tabs at runtime
B4X:
ASSegmentedTab1.RemoveTab(1) 'Remove via Index
ASSegmentedTab1.RemoveTab2("ValueTest") 'Remove via Value
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…