Android Question [ASTabMenu] Tab text color

angel_

Well-Known Member
Licensed User
Longtime User
When I try to change the text color of the tabs after loading the layout, the changes do not take place, they take place when selecting another tab manually.

B4X:
Sub CustomTab(TabMenu As ASTabMenu)
    TabMenu.TabStripMode = True
    TabMenu.text_font = xui.CreateFont2(CustomFontB4X, TabMenu.text_font.Size * 0.8)
    TabMenu.TabTextColor = xui.Color_Gray    '<-- doesn't work
    TabMenu.SelectedTabTextColor = xui.Color_Green '<-- doesn't work
    TabMenu.UnderLineHeight = 5dip
    TabMenu.UnderLineColor = xui.Color_LightGray
    TabMenu.SetTab(TabMenu.CurrentIndex, False, False)
    TabMenu.CommitChanges
End Sub
 

Alexander Stolte

Expert
Licensed User
Longtime User
I recommend switching to the new TabMenu:
 
Upvote 0

angel_

Well-Known Member
Licensed User
Longtime User
Thanks you, for now the other library is enough but I can't customize the text colors of the tabs
 
Upvote 0

Alexander Stolte

Expert
Licensed User
Longtime User
but I can't customize the text colors of the tabs
Yes you can:
B4X:
AS_TabMenuAdvanced1.GetTab(2).xTabProperties.SelectedColor = xui.Color_Red
AS_TabMenuAdvanced1.GetTab(2).xTabProperties.UnselectedColor = xui.Color_Blue
AS_TabMenuAdvanced1.Refresh
 
Upvote 0
Top