开发者

Android Application not fit to screen correctly

I have found a problem in Android Emulator,

when i run application on Emulator on android 2.3.3 WQVGA400 it runs fine,

but screen width size is so small

so i check the Built in Resolution to make width size to 800" something and height t0 600"

Now my problem i开发者_JS百科s when i run application on this, then it shows only in a short portion of Emulator screen, extra space on below is always remain

And one thing is that when I run on Actual device is runs very perfectly

Android Application not fit to screen correctly


You should probably read this: http://developer.android.com/guide/practices/screens_support.html


Add to your AndroidManifest.xml

<supports-screens
        android:smallScreens="true"
        android:normalScreens="true"
        android:largeScreens="true"
        android:xlargeScreens="true"
        android:anyDensity="true" />


How do you add the text in the green buttons? Is this button a nine patch image? Is the text separate from the image?

Use nine patch images. Then add the text using Button control, where you put the image as background and the text as caption/title/text so on. And when you run the application on larger screen, the image + text will be resized correctly.


Add next line to your AndroidManifest.xml:

<supports-screens android:resizeable="true" />

More information about this attribute can be found in documentation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜