Some time ago, I had a similar problem when writing animated wallpapers that used canvas and bitmap images. I could not achieve what I wanted using the default layout folders.
In my case, for example, a medium-density device with an xlarge screen (1280x800) should use the same resources as a high-density device with a regular screen (600x1024).
I decided to write my own solution, placing resources in three groups and selecting them using custom rules.
DisplayMetrics metrics = resources.getDisplayMetrics(); int screenSize = resources.getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK; switch (metrics.densityDpi) { case DisplayMetrics.DENSITY_LOW: if (screenSize == Configuration.SCREENLAYOUT_SIZE_SMALL || screenSize == Configuration.SCREENLAYOUT_SIZE_NORMAL) { return new SmallResourceProvider(resources); } case DisplayMetrics.DENSITY_MEDIUM: if (screenSize == Configuration.SCREENLAYOUT_SIZE_NORMAL) { return new MediumResourceProvider(resources); } default: return new LargeResourceProvider(resources); }
Perhaps this will be useful in your case.
source share