Developing BlackBerry applications for different screen sizes

前端 未结 3 393
日久生厌
日久生厌 2021-01-25 00:40

I am developing an application on JDE 4.5. The 4.5 OS is supported by the Pearl, Curve and Huron so the application which I am developing will support all the above devices. The

相关标签:
3条回答
  • 2021-01-25 01:04

    Blackberry device resolutions can be broadly placed in two categories:

    1. Low Resolution (width less than or equal to 320px)
    2. High Resolution (width more than 320px)

    This categorization conveniently allows us to maintain only two versions of the bitmaps and layouts - one for low-res devices and one for high-res devices.

    Sample code for dealing with these different categories of screen resolution would be:

    boolean lowRes = net.rim.device.api.system.Display.getWidth() <= 320;
    if (lowRes)
    {
        // The device has a low resolution screen size
    }
    else
    {
        // The device has a high resolution screen size
    }
    

    Source: Developing applications for different screen sizes (http://docs.blackberry.com)

    0 讨论(0)
  • 2021-01-25 01:08

    The the screen sizes are not the same ratios you could add multiple sized images to the project and based on the screen res use the appropriate image. (Large App Size)

    If the image is a gradient and gradient portion ends at the lowest screen res you could fill the remaining background with the solid color the gradient ends with.

    For controls you can use layout managers and build in styles to center and stretch controls to the width of the actual BB. Try to avoid using fixed width to make your app the most compatible. If you've developed web apps the same concepts apply.

    Hope this helps.

    0 讨论(0)
  • 2021-01-25 01:16

    Use calculate the position of contents using width(Display.getWidth option).Based on the screen width option ,u can position it.For images,u can resize,use images of 3 sizes

    i)For Bold type of Phones ii)Storm iii)Pearl

    create Images for it or else use resize option

    0 讨论(0)
提交回复
热议问题