Issue
I've created 'drawable directories' by density and also 'layout directories' by screen size in res directory. The drawable directories have images in it.
I need to know how a 'layout' find its corresponding drawable directory from the 'drawable directories'.
Eg. 'layout-large' maps to which one of these - drawable-mdpi,hdpi,xhdpi,xxhdpi,xxxhdpi ?
Solution
When you request a resource for which you provide alternatives, Android selects which alternative resource to use at runtime, depending on the current device configuration.
See the flow chart:
https://developer.android.com/images/resources/res-selection-flowchart.png
Please refer to the official documentation here 'How Android finds the best-matching resource.'
Answered By - Bruno Bieri
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.