我正在尝试开发与 galaxy S4 兼容的应用程序。
我知道我需要在 list 中添加屏幕密度 480,但它是归类为普通屏幕还是大屏幕,因为人们有不同的说法?
例如,如果我在 galaxy S4 上运行以下代码,尺寸会产生什么结果?
int size = getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK;
size = 2 = Normal,
size = 3 = Large
在您的开发中,您不应该为星系 SIV 做任何特定的事情,一切都会扩展。
如果你想玩不同的资源,你可以在你的文件夹中使用限定符:
res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)
此页面将向您学习很多有用的技巧:http://developer.android.com/guide/practices/screens_support.html