Discussion Forums  >  Status Bar, Navigation Bar

Replies: 4    Views: 116

Dragon007
Lost but trying
Profile
Posts: 1509
Reg: Dec 17, 2011
London
20,590
04/05/12 03:16 PM (12 years ago)

Change Colour of Tab Bar Menu

Can anyone tell how to change the colour of the Tab Bar Menu, scratching my brains, em!!!
 
Skyr0s
Code is Art
Profile
Posts: 196
Reg: Jan 26, 2012
Hong Kong
4,310
like
04/06/12 03:45 AM (12 years ago)
I do not know, but I guess that if you change the JSON Config File, you can change the colour. Good luck !
 
drecul
Aspiring developer
Profile
Posts: 2
Reg: Dec 20, 2012
purmerend
6,220
like
01/15/13 12:13 PM (11 years ago)
The JSON data will be overwritten by the java file where the colour apparantly is hard coded. In eclipse: go to the BT_activity_root_tabs.java file and uncomment line : 144 to 150 (make sure to comment out line 144) public static void setTabColor(TabHost tabhost) { /* uncomment this to change tab colors when a tab is selected... BT_debugger.showIt(activityName + ":setTabColor"); for(int i = 0; i < tabhost.getTabWidget().getChildCount(); i++){ tabhost.getTabWidget().getChildAt(i).setBackgroundColor(BT_color.getColorFromHexString("#000000")); //unselected } tabhost.getTabWidget().getChildAt(tabhost.getCurrentTab()).setBackgroundColor(BT_color.getColorFromHexString("#999999")); // selected */ And line 307. Replace to hex values with your colour. public static void setTabColor(TabHost tabhost) { /* uncomment this to change tab colors when a tab is selected... BT_debugger.showIt(activityName + ":setTabColor"); for(int i = 0; i < tabhost.getTabWidget().getChildCount(); i++){ tabhost.getTabWidget().getChildAt(i).setBackgroundColor(BT_color.getColorFromHexString("#000000")); //unselected } tabhost.getTabWidget().getChildAt(tabhost.getCurrentTab()).setBackgroundColor(BT_color.getColorFromHexString("#999999")); // selected */
 
ChrisYemaya
Code is Art
Profile
Posts: 60
Reg: Jul 29, 2011
Orlando
3,400
like
01/08/14 05:23 PM (10 years ago)
I was wracking my brains out trying to figure this one out, thanks Drecul, you totally saved the day lol.
 
almosturban
Aspiring developer
Profile
Posts: 19
Reg: May 23, 2011
Canada
1,840
like
06/20/14 10:50 PM (10 years ago)
Hi Drecul, Has the method to change tabs changed? I am working on an Android app, trying to change the tab color, but the code you referenced in your post is not coming up in Eclipse. Do you know how to change the color with a Buzztouch 3.0 Android app? Thank you,
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.