Programmatically find best-matching resource at runtime
Is it possible to fin开发者_开发技巧d the best-matching resource Programmatically at run-time ?
For example I have some device that have screen properties that makes perfect match for layout-normal-mdpi. How can I, at run time, read that that specification ? For example for my screen the result should be normal screen size and for the density mdpi as perfect match.
This should be able to be done automatically by creating qualified resource folders. If you create multiple resource folders for different conditions the device will read your conditions and choose the best version of the resource for it.
Reference: http://developer.android.com/guide/topics/resources/providing-resources.html
精彩评论