简体   繁体   English

屏幕分辨率

[英]Screen resolution

I'm writing a real-time Android game, so I need to be able to handle different aspect ratios and resolutions correctly. 我正在编写一个实时Android游戏,因此我需要能够正确处理不同的宽高比和分辨率。

For now, I'm using my Samsung Fascinate. 现在,我正在使用我的Samsung Fascinate。 My phone's specifications indicate that the screen resolution is 480x800. 我手机的规格表明屏幕分辨率为480x800。 But when I check the screen resolution in the game, it says 533x320 instead... 但是当我检查游戏中的屏幕分辨率时,它改为533x320。

Why is this? 为什么是这样?

On your Manifest add a: 在清单上添加:

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

This behavior is discussed in detail on the documentation under the section: 在本节下的文档中详细讨论了此行为:

"2. Auto-scaling of pixel dimensions and coordinates" “ 2.像素尺寸和坐标的自动缩放”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM