Adjust BitmapFields Width in HorizontalFieldManager according device width

234 views Asked by At

I am new in BB development,

Please suggest me how i can adjust BitmapFields Width which are in HorizontalFieldManager to adjust it in Device width.

I am overriding Sublayout method to get this

Now it look like this....I am getting expected o/p for Simulator 9550

Bottom Bar

Thanks

2

There are 2 answers

0
rfsk2010 On

Create a customBitmapField class which extends BitmapField. Override getPreferredWidth() method and return (Display.getWidth()/3) so the bitmapfield takes up a third of the device display. you will have to handle how it looks in smaller devices as well as the text might not fit.

0
Abed Hawa On

you can use the PillButtonSet component, you can find it in the advanced UI package. see here: Advanced UI