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
Trusted Contributor
Posts: 224
Registered: ‎08-09-2011
My Device: 9550
My Carrier: BBprogrammer

How can i Calculate Display Width for this

button!.PNG

 

 

 

 

Hi ,

 

    Can any Suggestion for Calculations of Display Widths and height i want to create this for all devices.

Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: How can I Calculate Display Width for this

In my opinion, you should not try to fix a width and height for all devices.

 

The size of your buttons will differs by device.  On non touchscreen that don't need to be so large as you don't have to hit them with a pinky.  Also on higher resolution screens you will need more pixels. 

 

So factor in the actual resolution of the device, the size of the screen and calculate the button size and so the screen size based on that.

 

You might like to mock this up on the smallest screens, for example the curve (non touchscreen) and 9800 devices and see how it looks/fits first.  My immediately reaction to your screen design is that

a) It is not very BlackBerry like, and

b) Won't work on small screen devices

 

So convince yourself that you really can do this on the smaller devices and then try to figure out how to do it dynamically on device. 

 

Just my opinion.  Good luck. 

Trusted Contributor
Posts: 224
Registered: ‎08-09-2011
My Device: 9550
My Carrier: BBprogrammer

Re: How can I Calculate Display Width for this

Thanks for reply,

For actual resolution of the device, i have created Custom class for creating Buttons for differnt resolutions.

Can you Explain How can i draw this Circulated Image things for Manager



Developer
Posts: 19,633
Registered: ‎07-14-2008
My Device: Not Specified

Re: How can I Calculate Display Width for this

[ Edited ]

That is a different question to the Subject isn't it?

 

You will need to create your own custom layout Manager.

 

Here is the docuemtnation that will help you do this:

 

http://supportforums.blackberry.com/t5/Java-Development/Create-a-custom-layout-manager-for-a-screen/...

 

http://supportforums.blackberry.com/t5/Java-Development/How-to-Extend-Manager/ta-p/446749