Why does Android app run in small window on tablet emulator?

点点圈 提交于 2019-12-18 04:10:54

问题


I have an Android App, it works properly on android phones. I've downloaded Android 3.0 sdk and created a tablet emulator at 1024x600, using Android 3.0. When I test my app it runs in a small window centered at the top, using about 1/4 of the screen.

What do I have to change in the app, xml files, or manifest to get it to use the whole tablet screen?

As a side note I also have icons for drawable-ldpi, hdpi and mdpi.

Thanks, Gerry


回答1:


The earlier sdk's did not have support for the extra large screens, so you need to specify in the manifest a new sdk version. I'll look up the details, but for now a quick fix is to add:

<uses-sdk android:targetSdkVersion="4"/>

to your manifest.




回答2:


Read up on the <supports-screens> Android manifest element. You probably want android:largeScreens="true" and android:xlargeScreens="true".




回答3:


This worked for me like a charm.

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

Refer here for more assistance.



来源:https://stackoverflow.com/questions/5398363/why-does-android-app-run-in-small-window-on-tablet-emulator

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