Issue
I have the following folders for layouts : layout, layout-large, layout-xlarge, layout-sw720dp
As far as I know, For Android 3.2+, if you have at least one folder that uses the new size quantifiers then it assumes that you are using these new size quantifiers everywhere and ignores any other folder that uses the old quantifiers.
Since I have one folder (i.e. layout-sw720dp) with the new quantifier, I would expect Nexus 7 to pick layouts from the default layout folder. But it is picking the layout from layout-large folder. Can someone please help me understand why?
Solution
Here I found the solution to my question: For Android 3.2+, if you have at least one folder that uses the new size quantifiers then it assumes that you are using these new size quantifiers everywhere and ignores any other folder that uses the old quantifiers.
But the way Android finds out whether you have a folder with new size quantifier is slightly different. It checks for new size quantifier folders only equal to and below the sw of the device that it's running on.
For example, for Nexus 7 Android would look for folders in the order sw600dp, sw480dp, sw360dp, sw320dp and finally if none of those are present it picks from layout folder. sw720dp though present is not taken into consideration since it is out of range for a nexus 7 device.
Answered By - DevAndroid
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.