开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜