如何创建跨多种分辨率缩放图像按钮? [英] How to create image buttons that scale across multiple resolutions?

查看:298
本文介绍了如何创建跨多种分辨率缩放图像按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有使用扩展跨多个黑莓手机型号的屏幕分辨率一个图像尺寸图像按钮标准methodolgy?

Is there a standard methodolgy for scaling image buttons using one image size across multiple blackberry phone model screen resolutions ?

我带调整基于显示宽度codeD图像分离。
因此,为了将图像调整到我做屏幕的四分之一长度 -

I'm resizing encoded iamges based on display width. So to resize an image to a quarter length of the screen I do -

imageLength = Dislay.getWidth / 4;

时有更好的东西?

Is there something better ?

感谢

推荐答案

我不知道我知道你需要什么。

I'm not sure I understand what you need.

你想缩放图像?如果是这样,看看<一个href=\"http://www.blackberry.com/developers/docs/4.5.0api/net/rim/device/api/system/En$c$cdImage.html#scaleImage32%28int,%20int%29\"相对=nofollow> scaleImage32(INT,INT)方法。此外,你应该使用的方法从的 Fixed32 类来计算图像尺寸。

Do you want to scale an image? If so, take a look at scaleImage32(int, int) method. Also, you should use methods from the Fixed32 class to calculate image sizes.

如果您只想缩放按钮,也许<一个href=\"http://stackoverflow.com/questions/1612738/how-to-create-customlabelfield-which-suites-for-all-blackberry-version/1650712#1650712\">this回答会帮助你。

If you only want to scale a button, maybe this answer will help you.

这篇关于如何创建跨多种分辨率缩放图像按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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