07-30-2008 12:04 PM
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.
Solved! Go to Solution.
07-30-2008 01:43 PM
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.
07-30-2008 05:27 PM
I resolved that issue, by just moving
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.
07-30-2008 07:26 PM
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.