Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 7    Views: 246

RobinvanKrieken
Aspiring developer
Profile
Posts: 50
Reg: Dec 20, 2012
Amsterdam
6,500
01/14/13 02:20 PM (13 years ago)

Customizing Bottom Toolbar

Android. Hi, With help I've figured out how to change the colors of the bottom toolbar buttons but I'm getting full blown colors. I'd like to keep the gradient that's in the standard version. So now I am searching for a way to "just" change the color of the selected button in the bottom toolbar. But I can't find anything on this subject on the Net which highly surprises me. Anyone any ideas where I should look? Thx in advance. Robin
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/14/13 02:58 PM (13 years ago)
There was something last week on that very topic. Lets scroll back a few days and see if I can find it. Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/14/13 03:01 PM (13 years ago)
 
RobinvanKrieken
Aspiring developer
Profile
Posts: 50
Reg: Dec 20, 2012
Amsterdam
6,500
like
01/14/13 03:17 PM (13 years ago)
Thx Smug, Good read, but About the thread on color: Will that work for Android too? Cuz I'm building android app. I notice the UIColor putplColor... that doesn't look like anything I've seen so far.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
01/14/13 03:22 PM (13 years ago)
Well, the edits are in the iOS code, so you'll need to work on the Android code as well. "How" to do it in Android is well beyond my present capabilities, however. Good Luck! Cheers! -- Smug
 
RobinvanKrieken
Aspiring developer
Profile
Posts: 50
Reg: Dec 20, 2012
Amsterdam
6,500
like
01/14/13 03:26 PM (13 years ago)
Thx!
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
01/14/13 06:07 PM (13 years ago)
Here- http://developer.android.com/guide/practices/ui_guidelines/icon_design_tab.html I think this is one area Android is a little easier than ios. I was poking around with Android tabs not long ago and setting up the different dpi images. I feel like there is some default gradient state for the selected tab you'll get by default. Or you can use that guide and add the code to the xml layout file and specify the exact selected state and normal state images. Def read this guide if you are new to Android. http://coding.smashingmagazine.com/2011/06/30/designing-for-android/ You want to understand those ldpi, mdpi, hdpi and xhdpi folders. Those are part of your BT project (and if not, make the folders!) take advantage of them, esp with all these new devices out there.
 
drecul
Aspiring developer
Profile
Posts: 2
Reg: Dec 20, 2012
purmerend
6,220
like
01/16/13 06:20 AM (13 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 */
 

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.