使用最小宽度限定符 -Android
Use the smallest width qualifier -Android
Android 文档 Use the Smallest-width Qualifier
状态:
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)
意味着 660dp 及更高的屏幕宽度与平板电脑类似。但是 phone 假设只有 5.5 英寸和 1440x2960 570dpi 并不意味着它是平板电脑。
那么你如何区分这种差异呢?
谢谢
But a phone with lets say only 5.5 inches and 1440x2960 570dpi doesnt mean that it is a tablet.
正确。
So how can you distinguish that difference?
使用最小宽度限定符。
1440 像素,570 dpi = 2.53 英寸 = 404dp。 404dp 小于 600dp,因此您建议的设备不会使用 -sw600dp
资源。
Android 文档 Use the Smallest-width Qualifier 状态:
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)
意味着 660dp 及更高的屏幕宽度与平板电脑类似。但是 phone 假设只有 5.5 英寸和 1440x2960 570dpi 并不意味着它是平板电脑。
那么你如何区分这种差异呢?
谢谢
But a phone with lets say only 5.5 inches and 1440x2960 570dpi doesnt mean that it is a tablet.
正确。
So how can you distinguish that difference?
使用最小宽度限定符。
1440 像素,570 dpi = 2.53 英寸 = 404dp。 404dp 小于 600dp,因此您建议的设备不会使用 -sw600dp
资源。