AndroidApp:不使用全屏分辨率
我尝试在手机上而不是模拟器上测试 Android 编程。这些应用程序仅使用屏幕中心的一些小空间。在模拟器中一切正常。所以我也尝试了“Hello world”应用程序。但也存在同样的问题。该手机是带有 HyperDroid 的 HTD HD2。因此它已将密度更改为 167。当使用 onSizeChanged 中的宽度和高度时,它会显示 320x430 或 480x270。
有没有办法使用整个屏幕?
编辑1:
它还在密度改变的模拟器上使用更少的屏幕。这也意味着标题栏不使用整个宽度。这是模拟器的屏幕截图:klick
I tried to test Android-programming on my phone and not the emulator. There the apps only use some little space in center of the screen. In the emulator everything works fine. So I also tried the 'Hello world'-app. But there is the same problem. The phone is an HTD HD2 with HyperDroid. So it has changed density to 167. When using width and height from onSizeChanged it says 320x430 or 480x270.
Is there a way to use the whole screen?
EDIT 1:
It also uses less screen on emulator with changed density. This also means that the titlebar doesn't use the whole width. Here is a screenshot of the emulator: klick
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想将此行应用于完整应用程序,则
将此行添加到应用程序选项卡,
否则,如果您想应用于单个活动,则
将此行添加到“活动选项卡属性”
if you want to apply this for full application then
Add this line to Application tab
otherwise if you want for individual activities then
Add this line to "Activity tab properties"
确保您已将
标记放入清单文件中。这为我解决了这个问题。
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.