0

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!!

Ahmad Shahwaiz
  • 1,432
  • 1
  • 17
  • 35

3 Answers3

0

there is couple of ways to achieve this,i advise you this one using AbsoluteFieldManager

//--------this is your toolbar AbsoluteFieldManager
AbsoluteFieldManager    _fieldManagerBottom;
_fieldManagerBottom = new AbsoluteFieldManager(); 
////------------

///--here you add the background image to your toolbar BitmapField BgField = new BitmapField(BottombackgroundBitmap, Field.NON_FOCUSABLE); _fieldManagerBottom.add(BgField);

////then you put your buttons and labels to the absolute manager at the position you want CustumerBitmapButton yourButton; yourButton = new CustumerBitmapButton (yourButtonBitmap,60,60,Field.FOCUSABLE);
_fieldManagerBottom.add(yourButton ,260,0);

touti
  • 1,164
  • 6
  • 18
0

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!!

Ahmad Shahwaiz
  • 1,432
  • 1
  • 17
  • 35
0

Beware that this will create trouble for you if you use your app on different resolution devices. So you should actually take care of that using a check on device resolution.

if(Display.getWidth>320)
    setMargin(0,0,0,intFor320);
else
    setMargin(0,0,0,intForLessThan320);
Atif Imran
  • 1,899
  • 2
  • 18
  • 33