I feel as if I'm missing something.
In my application, I decided to provide alternative drawable resources and alternative layout files. My structure is as follows:
res/drawable-hdpi/filename.png
res/drawable-mdpi/filename.png
res/drawable-ldpi/filename.png
res/layout-small/layout.xml
res/layout-large/layout.xml
res/layout/layout.xml
I created three different emulators: one with the default HVGA, one with QVGA, and one with WVGA800
It doesn't seem to pick up those alternative resources/layouts based on screen size/density, or maybe i just can't tell?
Is there some way, other than using a device for each specific size, to test this? Or am I just missing something important?
Another question, how well does Android scale drawables if no alternative resource exist?
A few points, in no particular order:
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizable="true"
android:anyDensity="true" />
android:anyDensity="false" />
in manifest file then the handset will get correct layouts and assets depending on its attributes.If you set android:anyDensity="false" />
in manifest file the handset handles the sizing of drawables, typically taking assets from drawables folder and resizing it.
In 3.2 above version android developer have been released two new things for tablets
layout-sw600dp-land
layout-sw720-land
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With