Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus
Accepted Solution

Bitmap position inside BitmapField

Hi, this may be a silly question, but is there a way for me to specify the position of the bitmap to add inside the BitmapField?

 

I already added the bitmapfield to the screen and I want to add multiple bitmaps inside the field but at certain locations specified. Is there a way to do this without changing the bitmapfield location?

 

Please help!

----------------------------------------------------------
Twitter: @gyubok
Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: Bitmap position inside BitmapField

There is one Bitmap per BitmapField, but you can add multiple BitmapFields to the screen. If you want to space them out, check Field.setMargin methods. For the explanation on how margins work, check the Javadoc on VerticalFieldManager and HorizontalFieldManager.

 

If you prefer specific positions, use (or, for pre-6.0 systems, recreate) an AbsoluteFieldManager:

Write your own implementation of AbsoluteFieldManager

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Developer
Posts: 660
Registered: ‎10-08-2009
My Device: Bold 9900
My Carrier: Telus

Re: Bitmap position inside BitmapField

Hi thank you for replying! Creating absolutefieldmanager seems quite complicated and lot of work!

 

I've found a way to achieve what I needed by processing multiple paint.drawBitmap!

 

Thanks for the help!

----------------------------------------------------------
Twitter: @gyubok