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 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.setBackgroundColor(0);
    gx.clear(clip);

    . . .

    gx.setColor(0xFFFFFF);
    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:

 

2064iD1615DBD4B2A6373

 

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

 

2065iE91C65C6ACE387D2

 

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.

 

 

 

 

 

Please use plain text.
Developer
RexDoug
Posts: 4,764
Registered: ‎07-21-2008

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.

 

 

Please use plain text.