开发者

Programmatically find best-matching resource at runtime

开发者 https://www.devze.com 2023-03-22 20:48 出处:网络
Is it possible to fin开发者_开发技巧d the best-matching resource Programmatically at run-time ?

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

精彩评论

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

关注公众号