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

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

App text draws in wrong color due to theme

[ Edited ]

I have a ListField that renders text in white over black background.


However, on one customer's phone it renders text in dark blue, both in the list and in the screen title.


It works fine on my phone which is the same model (8330).


The code is like this:



 public void drawListRow(ListField f, Graphics gx, int i, int y, int w) {
    . . .

    . . .

    gx.drawText( ______ , x, y);




Does anyone have a clue how that could end up blue?!  Non-text colors are rendered correctly, it's just text that's always turning up blue.  Can a theme override text color throughout an app?  The customer is using the "Real World Today - Business" theme.


EDIT:  We confirmed that when the theme is switched the colors are normal.  Is there a way to prevent the theme from overriding the app's text colors?


Here's how it looks on my 8330:




and here's how it looks on the customer's 8330:




Thank you... this app has a free trial so for all I know this could be happening to a lot of people who are just not speaking up.  I'd like to solve it.






Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: App text draws in wrong color due to theme

Try overriding the undocumented method:


public void applyTheme()




...with an empty implementation. This should defeat the theme.