Can't lose ListField VerticalScrollBar on 8230 only?

I have a ListField, who always shows a scroll bar on the simulator of 8230. I build using the library of 4.6 in Eclipse. It works fine on any other Simulator.

The issue is the screen 8230 is so narrow (240) I need to each pixel of data. I have disabled in the scroll area manager, who has worked on other devices. The scroll bar takes the last 30px.

It is the only area in my MainManager which is defined as:

public LogScreen() {
    super(Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR | Manager.USE_ALL_WIDTH | Manager.USE_ALL_HEIGHT);
...
logList = new ListField()

I calculate the positioning of the last text column in the ListfieldCallback as:

listWidth = Display.getWidth();
g.drawText(text[4], (int)(listWidth-5-_font.getAdvance(text[4])), y, 0, w);

Any ideas?

Unfortunately, there is no getBounds in 4.6 API. But I think I understand it anyway.

It has something to do _font.getDefault () do not have enough information to _font.getAdvance work correctly in 4.6 - on this phone. It worked very well in 5.0.

I solved by being more specific and in generating the police completely and affecting him. GetAdvance now works as expected.

FontFamily ff;
try {
    ff = FontFamily.forName("BBAlpha Sans");
    _fontLog    = ff.getFont(FontFamily.SCALABLE_FONT, StopwatchApplication.fontSizeLog, Ui.UNITS_px).derive(Font.PLAIN);
    setFont(_fontLog);
} catch (ClassNotFoundException e) {    // TODO Auto-generated catch block
    e.printStackTrace();
}

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for