制定不同的屏幕尺寸黑莓应用 [英] Developing BlackBerry applications for different screen sizes

查看:158
本文介绍了制定不同的屏幕尺寸黑莓应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发的JDE 4.5的应用程序。 4.5 OS是由珍珠,曲线和休伦所以我正在开发将支持所有上述设备的应用支持。我现在面临的问题是屏幕尺寸。珍珠的屏幕尺寸为240×260,曲线320×240,休伦湖320×240。

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 problem which I am facing is screen size. Screen Size of the Pearl is 240 x 260, Curve 320 x 240, Huron 320 x 240.

我现在面临以下问题:


  1. 应该是什么背景图像的尺寸
  2. 我应该如何放置字段(按钮,标签....)?

  1. What should be the dimensions of the background image?
  2. How should i place the fields (button , label....)?

任何一个可以请帮我。

非常感谢

推荐答案

黑莓设备的分辨率大致可划为两种类别:

Blackberry device resolutions can be broadly placed in two categories:


  1. 低分辨率(宽度小于或等于320像素)

  2. 高分辨率(宽度超过320像素)

这个分类方便地让我们只保留两个版本的位图和布局 - 一个用于低分辨率设备,一种针对高清晰度设备。

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.

样code与这些不同类别的屏幕分辨率的处理将是:

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
}

来源:<一个href=\"http://docs.blackberry.com/en/developers/deliverables/29251/Developing_apps_for_different_screen_sizes_1579421_11.jsp\"相对=nofollow称号=为不同的屏幕尺寸开发应用程序>针对不同的屏幕尺寸开发应用程序(http://docs.blackberry.com)

这篇关于制定不同的屏幕尺寸黑莓应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆