Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
LSphone
Posts: 140
Registered: ‎02-08-2010
My Device: Torch 9800, Storm 9530, Curve 8330
My Carrier: AT&T, Verizon

Use applyTheme to fix fg/bg color but leave focus & buttons normal?

Like many others I had a problem with themes overriding my text color so it was nearly invisible.

 

Overriding applyTheme() in MainScreen solved that, but it also utterly destroyed the following:

 

1. Screen title (no line or shading)

2. Buttons are invisible (no rectangle or focus color, just disappear when focused)

3. Focus color is black instead of something nicer like blue.

 

Has anyone found a way to keep applyTheme from fouling the text and background color, but allow it to do the rest of its work so that every last item on the display doesn't have to be subclassed and re-implemented manually by overriding its paint and drawFocus methods?

 

Thank you

 

Please use plain text.
Developer
knight9
Posts: 84
Registered: ‎09-21-2008
My Device: Not Specified

Re: Use applyTheme to fix fg/bg color but leave focus & buttons normal?

Were you able to come up with solution to this problem?

Please use plain text.
Developer
LSphone
Posts: 140
Registered: ‎02-08-2010
My Device: Torch 9800, Storm 9530, Curve 8330
My Carrier: AT&T, Verizon

Re: Use applyTheme to fix fg/bg color but leave focus & buttons normal?

I just added a menu option to invert the colors.  The app was "What's Running", which normally has white and colored text over a black background, but the text was being made almost invisible by a few themes.

 

There haven't been any more complaints, so apparently people are finding the option all right.  When it's selected it reverts to standard dark text on light background.  The theme still kills the colored text, but at least it can be read.

Please use plain text.