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
skylark
Posts: 19
Registered: ‎07-21-2008
My Device: Not Specified
Accepted Solution

Display issue on 8330 and 8310

Hello Experts,

 

I have a blackberry application which is working fine in all devices except 8330 and 8310.

 

My applcation pops up a screen(which has One LabelField and one BasicEditField) when a button is clicked. It works in all devices, but in contrast, 8330 and 8310 doesn't show up both the LabelField and BasicEditField, it just show  me a blank screen. But when i press "Enter" on the blank screen, it triggers FieldChanged event of the LabelField. How it's possible?

 

May be both the fields are hidden?

If so, it's showing in all other devices.

 

I am so confused.

 

Please advice me on this.

 

Thanks!!!

 

 

 

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

Re: Display issue on 8330 and 8310

Is it possible that you have a color conflict with a theme on the device? I've seen this occur, where the foregrouind colors are the same as the theme background. This causes the field to appear "invisible", although everything still works as expected.

 

 

Developer
skylark
Posts: 19
Registered: ‎07-21-2008
My Device: Not Specified

Display issue on 8330 and 8310 resolved

I resolved that issue, by  just moving

this.setFont(defaultFont); 

from the mehtod getPreferredWidth into constructor of subclass of an EditField.

 

But i don't know the reasson for why it's happening?

 

Thanks for all. 

Developer
richard_puckett
Posts: 191
Registered: ‎04-03-2008
My Device: Bold 9700

Re: Display issue on 8330 and 8310 resolved

IIRC, I've had issues when setting the font during the layout process.  I believe what was happening was one of two things (memory is fuzzy here):

1) It was causing a relayout and my (sub)layout method could not handle being called multiple times;

2) It was getting stuck in a relayout loop.  Would layout, set font, relayout triggered, repeat.

 

In any event, if you want to find out the cause I'd run through a debugger and break (or sysout) on your getPreferredWidth method and any layout or sublayout methods.  You might find that you're inadvertantly causing your controls to lay out offscreen, on top of eachother, or something else weird.