android 设备屏幕尺寸与四种通用屏幕尺寸中的任何一种都不匹配的概率为 0.00001%?
如果是,它将从哪里选择布局资源,如果我没有在默认布局文件夹中定义它们?
注意我有默认布局文件夹res/layout/
,但没有在此文件夹中定义所有屏幕,而是在相应的布局-'屏幕大小'文件夹中定义它们。
android 设备屏幕尺寸与四种通用屏幕尺寸中的任何一种都不匹配的概率为 0.00001%?
如果是,它将从哪里选择布局资源,如果我没有在默认布局文件夹中定义它们?
注意我有默认布局文件夹res/layout/
,但没有在此文件夹中定义所有屏幕,而是在相应的布局-'屏幕大小'文件夹中定义它们。
Is there any 0.00001% chance that android device screen size does not match with any of four generalized screen sizes?
All devices that legitimately have the Android Market on them will be in one of the four size buckets, or possibly in new buckets defined as part of future versions of Android.
However, there are devices (e.g., WIMM One wearable) that run Android and do not have the Android Market on them. Such devices could, in theory, do something unusual.
If yes, from where will it pick the layout resources, if I don't have defined them in default layout folder?
You would have to ask the device manufacturer.
I have default layout folder res/layout/ but don't have all the screens defined in this folder rather defined them in corresponding layout-'screen size' folder.
Generally speaking, it is best to have one of everything in res/layout
, then override them with tailored layouts only where needed (e.g., in res/layout-large-land/
). If nothing else, this minimizes code duplication.