Android Canvas屏幕分辨率问题
在我的应用程序中有一个画布,当两部手机通过蓝牙连接时,我们可以实时共享绘图。
问题是当不同屏幕尺寸的手机(例如:LG Optimus 和 HTC Incredible S)通过蓝牙连接时, 画布的缩放变得混乱,HTC 中的画布只有一小部分相当于 LG 的画布。
仅当我在清单文件中使用以下内容以实现市场兼容性时,才会发生这种情况
<uses-sdk android:minSdkVersion="7"></uses-sdk>
如果未定义上述内容,它将实现适当的宽度尺寸映射和几乎完美的高度缩放。
我不明白为什么会发生这种情况。 有没有其他方法可以映射画布,以便我们可以在从手机到平板电脑的不同屏幕尺寸之间进行缩放。
In my application there is a canvas, when two phones are connected via bluetooth we can share the drawing in real time.
Problem is when phones of different screen size ex: LG Optimus and HTC Incredible S are get connected via bluetooth,
The scaling of the canvas goes haywire only a small part of the canvas in HTC is equivalent to the LGs canvas.
This happens only when i use the following in the manifest file for market compatibility
<uses-sdk android:minSdkVersion="7"></uses-sdk>
If the above is not defined it achieves a proper width size mapping and almost perfect height scaling.
I am not getting why it is happening.
IS there any other way we can map the canvas in such a way that we can scale between different screen sizes varying from phones to tablets.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用以下内容:
You could use the following: