问题
Android documentation Use the Smallest-width Qualifier states:
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. 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?
Thanks
回答1:
But a phone with lets say only 5.5 inches and 1440x2960 570dpi doesnt mean that it is a tablet.
Correct.
So how can you distinguish that difference?
Use the smallest-width qualifier.
1440 pixels at 570 dpi = 2.53 inches = 404dp. 404dp is less than 600dp, and so your proposed device would not use -sw600dp
resources.
来源:https://stackoverflow.com/questions/49796388/use-the-smallest-width-qualifier-android