开发者

Blackberry vertical scrolling for side by side vertical managers

I have to built this UI for Blackberry JRE 4.6 & above. Please suggest the开发者_运维技巧 approach for this UI.

Blackberry vertical scrolling for side by side vertical managers


I solved the problem, here is the approach,

  1. Take horizontal manager for header

    HorizontalFieldManager nonscrollableHFM= new HorizontalFieldManager();

  2. Take another horizontal manager as a container

    HorizontalFieldManager containerHfm = new HorizontalFieldManager();

    2.1 Add vertical manager for left section (Non Scrollable)

    VerticalFieldManager leftVfm = new VerticalFieldManager();

    2.2 Create a custom vertical manager for right section as below

{

   class RightVfm extends VerticalFieldManager {

  RightVfm() {

    super(VERTICAL_SCROLL | VERTICAL_SCROLLBAR | NO_HORIZONTAL_SCROLL
    | NO_HORIZONTAL_SCROLLBAR | USE_ALL_WIDTH);

      }

  protected void sublayout(int width, int height) {

      super.sublayout(width, getPreferredHeight());

      setExtent(width, getPreferredHeight());

  }

  public int getPreferredWidth() {

     return _width;

  }

public void setWidth(int w) {

            _width = w;

        }

public int getPreferredHeight() {

            return _height;

        }

public void setHeight(int h) {

            _height = h;

        }

    private int _width;
    private int _height;

};

}

  1. Adjust the height & width of right verticle manager by calling setHeight & setWidth methods

    I got help from here, http://www.blackberryforums.com/developer-forum/209190-set-height-verticalfieldmanager.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜