Android,布局屏幕宽度
我正在申请,但遇到了一个困扰我的问题。我创建了一个应用程序,其中一项活动无法正确适应较小的屏幕。我检查过 Galaxy Nexus 和 SG2,它们看起来都很完美,但当它在 HTC Wildfire 上运行时,大约 20% 的宽度被切掉(从右侧)。在xml文件中,所有布局都定义为wrap_content/fill_parent,所有尺寸均以dp为单位测量,在清单中,我已将anyDensity、可调整大小以及小、正常和大屏幕的支持屏幕设置为true。该应用程序在 sdk 版本 7 上运行。另一件事是,当我使用设置为与 Wildfire 相同的值的模拟器时,它会缩小模拟器以使其适合,因此我在追踪问题时遇到了问题。关于问题可能是什么的任何想法吗?
I'm in the process of making an application, but I've encountered an problem which is bugging me. I've created an application where one activity that fails to properly fit into smaller screens. I've checked on a Galaxy Nexus and on a SG2 and both of them looks perfect, but when it runs on a HTC Wildfire roughly 20% of the width is cut away (from the right). In the xml-file all layouts are defined as either wrap_content/fill_parent, all sizes are measured in dp and in the manifest i've set support screen for anyDensity, resizeable, and small,normal and large screens to true. The application is running on sdk version 7. The other thing is that when I use the emulator set up on the same values as the Wildfire it scales it down so it will fit, hence I have problems tracking down the problem. Any ideas on what the problem could be?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我通过为每个有问题的文本视图/编辑文本添加权重解决了这个问题。
I solved the problem by adding a weight to each textview/edittext in question.