How to create image buttons that scale across multiple resolutions?

落爺英雄遲暮 提交于 2019-12-13 06:42:55

问题


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

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 ?

Thanks


回答1:


I'm not sure I understand what you need.

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.

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



来源:https://stackoverflow.com/questions/5578725/how-to-create-image-buttons-that-scale-across-multiple-resolutions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!