0

I am developing an application which shows some user details on a screen. I use a custom ListField as suggested by the StackOverflow question "How to customize list field in blackberry?"

I am trying to appaly a font to each list field element, and it works well. But when I try to give 2 different fonts for two listfields, the font is only changed when I scroll on the screen. Does anyone have an idea how to resolve it?

field = getField(1);
layoutChild(field, 200, fontHeight + 1);
setPositionChild(field, preferredWidth-preferredWidth/3, 3);
setFont(fontForAllElements); 
Font fontForAllElements = Font.getDefault();
fontForAllElements = fontForAllElements.derive(Font.PLAIN, 16);
Community
  • 1
  • 1
Jisson
  • 3,566
  • 8
  • 38
  • 71

1 Answers1

0

If scrolling fixes your problem, perhaps calling ListField.invalidate() will do the redrawing you need.

Michael Donohue
  • 11,776
  • 5
  • 31
  • 44