Android SDK - selecting correct resources -


i built android tablet application , i'm trying figure out how make system select correct resources.

i understand concepts described in documentation. there number of different resource folders different densities ldpi, mdpi, hdpi, etc... - there way have system select resources based on resolution of device? in layout folder structure can specify minimum width layout-sw600dp. there similar mechanism resources? there several devices considered medium density have different resolutions. ideally define resources resolutions , have more flexibility pixel density.

i've tried use built in scaling doesn't appear work nexus 7. resources designed higher resolutions not seem scale down @ all. perhaps i'm doing wrong.

thanks.

i'm not 100% sure read question correctly, can suffix subfolder of res/ folder target specifiers. not res/layout-sw600dp, res/drawable-sw600dp , res/values-sw600dp. these rules can combined, res/values-sw600dp-mdpi work.

also note android sdk documentation bit flaky in area. training section explains a neat trick using resource aliases helps avoid copy-pasting layout xml's, api guide , reference docs never mention it, it's overlooked.


Comments