我试图在自定义屏幕分辨率上运行我的应用程序,但我的应用程序居中并且仅占据屏幕的 320x480(纵向)和 480x320(横向)并且与 Activity 的顶部水平对齐。
虽然其他应用程序和默认的 android Activity 表现得很好,但我的应用程序却没有。我没有使用任何固定值或布局属性。它只是一个 hello world 应用程序。
我已经尝试过主题和窗口功能,但似乎没有任何效果。任何指针将不胜感激。谢谢。
最佳答案
Kumar Bibek在类似post中回答了这个问题.
应用程序在平板电脑的兼容模式下运行。我将以下内容添加到我的 AndroidManifest.xml 并且它工作正常。
<supports-screens android:largeScreens="true"
android:normalScreens="true" android:smallScreens="true"
android:anyDensity="true" android:xlargeScreens="false" />
关于Android 应用程序不会占据整个屏幕,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6787049/