BlackBerry - statusbar overlapping screen

268 Views Asked by At

I have defined a status bar in my BlackBerry app as a HorizontalFileManager containing 2 buttons, but when the bar is displayed, it overlaps the bottom part of the screen. If I drag the screen, I can read the information on the bottom, but as soon as I release it, it disappears again under the status bar.

How can I avoid this? I've tried with setPadding(), setBorder(), setExtent(), but nothing changed.

1

There are 1 best solutions below

0
G B On

Thanks for the suggestions, but I didn't want to reimplement the wheel.

The current solution looks like this:

public class VerticalSpacerField extends VerticalFieldManager {
    private final int preferredHeight;

    public VerticalSpacerField(final int preferredHeight) {
        this.preferredHeight = preferredHeight;
    }

    protected void sublayout(final int maxWidth, final int maxHeight) {
        super.sublayout(maxWidth, maxHeight);
        setExtent(maxWidth, preferredHeight);
    }
}

and

add(new VerticalSpacerField(statusBar.getPreferredHeight()));