I have developed an LWUIT app. I have two types of images dispayed in the app. One coming from server side that need to displayed (like a photo posted and saved to server side) and one packaged in my jar and displayed mainly as icons (like a music icon, loading animation gif etc). I need to display all images according to the sreen size and resolution. The first kind is displayed by taking the screen display height and width and then use scale method and show a scaled version of the image. But however I have no idea how to show the second kind. i.e. icons. Example, my loading image looks good in most of the phones but for some phones like samsung, it looks blurred and over-sized. How to do this. My basic idea is to keep 3 types of images of icons like icon_width_lowXheight_low.png, icon_width_mediumXheight_medium.png and image_width_highXheight_high.png and show it based on the screen size. Please let me know the bets way to achieve this? Thanks, Parvathy
2 に答える
1
LWUIT 1.5 で追加された MultiImages を使用する必要があります。LWUIT にはこれに関するリンクはありませんが、Codename One での作業はこれにかなり近いので、How Do I? をチェックしてください。マルチイメージで(そして、Codename Oneへの移行をお勧めします)。
于 2013-06-13T11:48:36.400 に答える
0
私はあなたがこれを使用する必要があると思います
Image i = Image.createImage("your image path here");
i = i.scaled(widthValue, heightValue);
そして、この値を Display.getInstance().getDisplayHeight() および Display.getInstance().getDisplayWidth() に関連付けます。
右?
于 2013-05-20T14:41:25.067 に答える