Question

I am writing an application which I intended to target starting from Android OS 2.3.3 to the latest release. I have to give support for multiple screen sizes.

I undrestand that I can provide multiple screen sizes support using drawable-hdpi, drawable-mdpi etc, however these were introduced in version 3.2. Before 3.2 it was somethign like drawable-small, drawable-normal etc.

If I create application which targets devices from os version 2.3.3, what kind of resources terminology should I use? If I use drawable-hdpi etc, would it work on the device having OS below than 3.2?

Thanks Bsengar

Was it helpful?

Solution

You can use the current version terminology, as it's based on the API you're compiling against.

You should compile with the 4.3 API (the latest as of this question), and to support earlier APIs, set your minSdkVersion appropriate in your <uses-sdk> section. You can use all the latest conventions for your folders this way and they will work across all versions.

OTHER TIPS

You can add this to manifest for different screen sizes. This will allow you to set your app GUI according to screen size of device.

<supports-screens android:smallScreens="true" 
          android:normalScreens="true" 
          android:largeScreens="true"
          android:xlargeScreens="true"
          android:anyDensity="true" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top