根据 Android 上的屏幕尺寸调整图像大小
我正在为 Android 制作一个图形密集型应用程序。
我面临的问题是,在我的主屏幕上,有 6 个图像放置在 FrameLayout 上。由于我拥有 HTC Desire,所以我放置的图像在 3.7 英寸上看起来很棒,但当我在 5 或 7 英寸显示器上测试它时,UI 变得疯狂,并且在 3.7 英寸上很好的微小图像之间存在巨大的间隙在。
如何修复我的应用程序以适应所有屏幕尺寸? 如何缩放图像以使图像没有间隙?
请帮忙....
I am making a graphic intensive application for Android.
The problem i am facing is that on my home screen there are 6 images that are placed on a FrameLayout. Since i own a HTC Desire, I placed the images such that they look great on 3.7in but when i test it on a 5 or a 7in display, the UI goes crazy and there are huge gaps amongst the tiny images which were nice on 3.7in.
How do I fix my app for all screen sizes?
How do I scale the images such that there are no gaps?
please help ....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请查看
Android 开发者
中的支持多屏幕在那里你会得到确切的答案。您必须创建不同的图像并根据密度
将它们放入相应的文件夹中。Look out this Supporting Multiple Screens in
Android Developers
from where you will get the exact answer. You have to create different images and put them in the respected folder's according to thedensities
.