开发者

Android emulator screen resolution problem

I want to create a android application with API 1.6 and for the android mobile 240x400 resolution. But the emulator I开发者_如何学运维 get is a smaller size which does not fit the application perfectly.


If I get you right, and you want to set the emulator resolution to 240x400, you can use command line option of the emulator -skin 240x400 (you can set it in eclipse from: Window -> Preferences -> Android -> Launch -> Default emulator options)


Make sure you have put the

<uses-sdk android:minSdkVersion="xx" android:targetSdkVersion="xx"/>

tag in your manifest file. This solved this issue for me.


u need use in window manager screen resolution purpose display the items depends the screen size u r using small devices u r problem not fit in to screen

wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
if(wm.getDefaultDisplay().getOrientation() == 0)
{
/* if window Height is greater than 480 (Droid mobile)*/
if(wm.getDefaultDisplay().getHeight()==400 )
{
u r items insetion code write here 
}
}

this code is help full

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜