Discussion Forums  >  Status Bar, Navigation Bar

Replies: 5    Views: 363

BkkRon
Android Fan
Profile
Posts: 6
Reg: Jun 10, 2013
Bangkok
1,710
06/14/13 02:43 AM (10 years ago)

Color banding in navigation bar

I've just started using BT and have a prototype app up and running on an android 4.1.2 device. I have a problem with color banding in the navigation bar -- I'm getting two horizontal color bands rather than a solid color. I'm using 2 plugins -- the simple menu and the button menu -- and the nav bar colors are defined for those screens (since these plugins seem to ignore the theme default color definition). Then nav bar color is defined with a hex code with the style set to "solid navigation bar". The result is two bands of color -- the bottom band is the correct color and the upper band is a desaturated version of the correct color. Any ideas for a fix? Changing the theme definition and background color doesn't seem to affect this.
 
BkkRon
Android Fan
Profile
Posts: 6
Reg: Jun 10, 2013
Bangkok
1,710
like
06/16/13 03:27 AM (10 years ago)
I also tested this on android 4.0.3 device (samsung galaxy 2) with the same result. It leads me to believe that I must have some configuration issue in eclipse with the android api's, since lots of people are creating android apps and I didn't hear any reports of similar problems with the nav bar colors. Everything else seems to be working normally except for this.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
06/20/13 03:32 AM (10 years ago)
Hello @BkkRon, I'm not sure if I understand what you mean. Can you post a screenshot showing the 'banding' you are talking about. And we'll see if we can get a bit further. Kind Regards Darrel
 
BkkRon
Android Fan
Profile
Posts: 6
Reg: Jun 10, 2013
Bangkok
1,710
like
06/20/13 08:06 PM (10 years ago)
Darrel, thanks for the reply. I'm not sure how to post a screenshot in the forum, but here's a dropbox link to a screenshot: https://www.dropbox.com/sh/m0cejvc9adtwozi/5K53dn-VdJ In the configuration for the menu plugin, the settings are: Nav bar color is set to #000099 Nav bar style is set to "Solid Navigation Bar" The color banding in the nav bar was seen on both android 4.1.2 and 4.0.3 devices. The banding is there with any color except white. I tried editing the res/drawable/bt_bg_title as well, but couldn't eliminate the banding. Any advice appreciated. This is my first project and I'm stuck on this small problem.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
06/21/13 09:11 PM (10 years ago)
@BkkRon, This 'banding' is on my Android apps too. I think it's part of the Android OS or at least part of the buzztouch code. It basically adds a highlight to your solid colour. I'd work around it unless you really want to dig into the the BT code. A bit of digging in the Bt_ViewsUtilities.java this might help.... Around line 106 ... //apply background overlay the background color for a gradient affect... Drawable d = BT_fileManager.getDrawableByName("bt_bg_title.png"); titleParts.setBackgroundDrawable(d); Try commenting out these two lines (haven't tried myself but it should work!) cheers Darrel
 
BkkRon
Android Fan
Profile
Posts: 6
Reg: Jun 10, 2013
Bangkok
1,710
like
06/23/13 08:55 PM (10 years ago)
Darrel, Thanks for your help. I see now that this is a 'feature', but I would call it an unsuccessful attempt at producing a gradient affect (good try, though). I've never seen it in another android app, so I think it's part of the BT code. Commenting those 2 lines in BT_viewUtilities.java does indeed remove the color banding. So you've solved my problem and I appreciate you taking the time to do that. Since there appears to be a BT android update coming that will add support for the action bar, I'll check this again once we see the update.
 

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.