Android providing alternative resources not working?

It seems to me that I missed something.

In my application, I decided to provide alternative available resources and alternative layout files. My structure is as follows:

Res / Hood-HDI / filename.png
Res / Hood-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 default HVGA, one with QVGA and one with WVGA800

It doesn't seem to be taking these alternative resources / layouts based on screen size / density, or maybe I just can't tell?

Is there any way, besides using the device for each specific size, to check this? Or did I just miss something important?

Another question: how well do Android apps stand out if an alternative resource does not exist?

+5
source share
2 answers

A few points in a specific order:

  • Layouts are related to the size of the screen and, thus, large, medium, small and long, are associated with density and, therefore, with hdpi, mdpi, ldpi. This is obvious to some and not so easy to understand for others.
  • Read this and create your emulator devices as indicated on this page, double check that you got them correctly.
  • , layout-320x480, , . layout-large/small .., AndroidManifest.xml <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:resizable="true" android:anyDensity="true" />
  • - layout.xml drawables , - layout-320x480.xml etc , drawables-hdpi .. android:anyDensity="false" /> , .

android:anyDensity="false" /> , , drawables .

+1

3.2 Android

layout-sw600dp-land
layout-sw720-land
+1

All Articles