Android的布局相同密度不同的对角线长度 [英] Android layouts for same density different diagonal length

查看:102
本文介绍了Android的布局相同密度不同的对角线长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有2个不同的Andr​​oid手机。细节

I have 2 different android phones. The details are

歌Nexus S:480 * 800像素,4.0英寸(233〜PPI像素密度)结果
Desire S的:480 * 800像素,3.70英寸(252〜PPI像素密度)

nexus s: 480 x 800 pixels, 4.0 inches (~233 ppi pixel density)
desire s: 480 x 800 pixels, 3.70 inches (~252 ppi pixel density)

现在我有我的布局文件夹,layout_hdpi和layout_xhdpi。现在这两个手机都是类作为华电国际电话。我有一个控制与5dip的向左和右的填充。但这些手机的5dip转化为不同的宽度,因此一个电话的边界上是第二个电话就胖吧。增加人们还增加了其它。有人可以帮我吗?

Now I have my layout folders as layout_hdpi and layout_xhdpi. Now both these phones are classes as hdpi phones. I have a controls with a padding of 5dip to the left and the right. But on these phones the 5dip translates to different widths hence the border on one phone is fatter then on the second phone. Increasing one also increases the other. Can someone help me please?

推荐答案

针对不同屏幕尺寸使用相关的布局..它不会对不同的手机不同宽度

for different screen sizes use relative-layouts.. it will not cause the problem of different width on different phones

这篇关于Android的布局相同密度不同的对角线长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆