Changing TabHost color

NJDude

Expert
Licensed User
Is it possible to change the background color of a TabHost?, I see it always defaults to greyish.
 

gapi

Active Member
Licensed User
It's possible without Java code ? Any settings for change color of tabhost ? My is orange ... :( how can change it ?

tnx
 
Upvote 0

Mahares

Expert
Licensed User
If you install the TabhostExtras library in the additional libraries path and reference it, you can change the color of the tabhost indicator. Make sure you search in the forum for TabhostExtras to find the zip file that has the libray (jar and xml files). Here is a sample. You can use any RGB color combination you want:

B4X:
   Dim TabHost1 As TabHost
   Dim MyTabHostExtra As TabHostExtras
   MyTabHostExtra.setTabGradientDrawable(TabHost1,"LEFT_RIGHT",Colors.RGB(167,0,80),Colors.RGB(95,158,160),6)
 
Last edited:
Upvote 0
Top