0

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.

G B
  • 2,951
  • 2
  • 28
  • 50
  • have a look here: http://stackoverflow.com/questions/9093691/how-i-can-make-status-bar-in-blackberry/9094982#9094982 – rosco Mar 05 '12 at 17:10
  • What are you using to implement your screen? The MainScreen class provides an implementation via setStatus(Field status). – Richard Mar 05 '12 at 23:36
  • I'm using MainScreen::setStatus(), and it's working. Except, when I scroll down, I can't see the bottom elements of the screen, the status bar is hiding them. – G B Mar 06 '12 at 08:13
  • see this link: http://stackoverflow.com/questions/8942225/tab-bar-in-blackberry-without-toolbarmanager/8967671#8967671 and In that code change here: super.sublayout(Display.getWidth(), 150); setExtent(Display.getWidth(), 150); like.....: super.sublayout(Display.getWidth(), bottomPanel.getHeight()); setExtent(Display.getWidth(), bottomPanel.getHeight()); try this one;Then you can get like this image: http://www.flickr.com/photos/74795641@N06/6734580553/in/photostream – alishaik786 Mar 06 '12 at 08:21

1 Answers1

0

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()));
G B
  • 2,951
  • 2
  • 28
  • 50