Search code examples
layoutblackberryblackberry-jde

Blackberry Help Aligning this layout


enter image description here

I have tried this but couldn't achieve. I used justifiedfieldmanager buy its for only 2 label. I used horizontalfieldmanager but it couldn't align it like this way. I just stuck in it how to get this type of layout in blackberry! Any help is really appreciated!

Thanks!!


Solution

  • I just found the solution:

    HorizontalFieldManager hfm = new HorizontalFieldManager();
    
    final ImageButton home = new ImageButton("",Field.FOCUSABLE, "home.png","home.png", 0x9cbe95);
                final ImageButton add = new ImageButton("",Field.FOCUSABLE, "add.png","add.png", 0x9cbe95);
                final ImageButton plus = new ImageButton("",Field.FOCUSABLE, "plus.png","plus.png", 0x9cbe95);
                final ImageButton bin = new ImageButton("",Field.FOCUSABLE, "bin.png","bin.png", 0x9cbe95);
    
                home.setMargin(0,0,0,50);
    

    Similary setmargins of others too!!