简体   繁体   English

使用最小宽度限定符-Android

[英]Use the smallest width qualifier -Android

Android documentation Use the Smallest-width Qualifier states: Android文档使用最小宽度限定符状态:

res/layout-sw600dp/main_activity.xml   # For 7” tablets (600dp wide and bigger)

600dp: a 7” tablet (600x1024 mdpi).
720dp: a 10” tablet (720x1280 mdpi, 800x1280 mdpi, etc)

meaning that screen widths with 660dp and higher are tablets like. 表示660dp及更高的屏幕宽度类似于平板电脑。 But a phone with lets say only 5.5 inches and 1440x2960 570dpi doesnt mean that it is a tablet. 但是一部只能说5.5英寸和1440x2960 570dpi的手机并不意味着它是平板电脑。

So how can you distinguish that difference? 那么如何区分这种差异?

Thanks 谢谢

But a phone with lets say only 5.5 inches and 1440x2960 570dpi doesnt mean that it is a tablet. 但是一部只能说5.5英寸和1440x2960 570dpi的手机并不意味着它是平板电脑。

Correct. 正确。

So how can you distinguish that difference? 那么如何区分这种差异?

Use the smallest-width qualifier. 使用最小宽度的限定符。

1440 pixels at 570 dpi = 2.53 inches = 404dp. 570 dpi下的1440像素= 2.53英寸= 404dp。 404dp is less than 600dp, and so your proposed device would not use -sw600dp resources. 404dp小于600dp,因此您建议的设备将不使用-sw600dp资源。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM