Search code examples
blackberry

how to create Tab bar application ui in blackberry...?


how to make tab bar base application in BB.Every screen of the app will be having this tab and each tab will have the seperate Navigation Controller Stack so we can push screens easily.


Solution

  • You have to create tab bar by using Horizontal Field Manage and then add fields to Horizontal Field Manager then set the Manager as title or staus for screen

    Example:

    HorizontalFieldManager hfm=new HorizontalFieldManager(Field.USE_ALL_WIDTH);
    
    hfm.add(new Button("item1"));
    hfm.add(new Button("item2"));
    hfm.add(new Button("item3"));
    

    Then

    setTitle(hfm); //display at top
    

    or

    setStatus(hfm); //display at bottom