不同的布局,以支持Android的不同的屏幕 [英] Different Layouts to support different screens in android

查看:243
本文介绍了不同的布局,以支持Android的不同的屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用不同的布局,以支持不同的屏幕,我应该用DP或像素。

When I use different layouts to support different screens , should I use dp or px .

推荐答案

始终使用DP,而不是像素。
有三种不同但相互关联的概念在这里明白了:屏幕像素密度(每英寸/厘米像素,或俗称DPI每在打印机英寸点数),物理屏幕尺寸(英寸或厘米)和像素数(也称为分辨率,以像素为单位)。

Always use dp instead of px. There are three distinct but linked concepts to understand here: screen density (pixels per inch/centimeter, or commonly known as DPI from dots per inch in printers), physical screen size (in inches or centimeters) and number of pixels (also known as resolution, in pixels).

<一个href=\"http://stackoverflow.com/questions/2638202/android-multiple-screen-sizes-with-same-density\">HERE是完整的答案。另请阅读

HERE is entire answer. Also read This.

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

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