0

I have a app with a dashboard with icons. The app only has drawable-hdpi folde with the icons.

When I start both the 4.0 and 4.1 emulator and launch my app from eclipse to both of them, the quality of the icons differ extremely! It's ugly on jellybean.

What is going on??

ICS Jellybean

Partial Manifest

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="14" />

    <supports-screens
        android:anyDensity="false"
        android:largeScreens="false"
        android:normalScreens="true"
        android:smallScreens="false" >
    </supports-screens>

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Peterdk
  • 15,625
  • 20
  • 101
  • 140

1 Answers1

1

Remove the supports-screen tag from your manifest (specifically, the anyDensity attribute). According to the documentation:

android:anyDensity

Indicates whether the application includes resources to accommodate any screen density. For applications that support Android 1.6 (API level 4) and higher, this is "true" by default and you should not set it "false" unless you're absolutely certain that it's necessary for your application to work. The only time it might be necessary to disable this is if your app directly manipulates bitmaps (see the Supporting Multiple Screens document for more information).

I'm not sure exactly what's happening between 4.0 and 4.1 that would cause the difference, but for the most part setting the anyDensity tag is a bad idea outside of very specific circumstances. As long as you've provided default resources (e.g. in the non-specific drawable folder), you won't need to specify it.

Kevin Coppock
  • 133,643
  • 45
  • 263
  • 274
  • Yes, I do however have somehow used that in my app to not include scaling for some generated custom views. Well, now I need to recode some stuff. – Peterdk Sep 24 '12 at 14:51
  • Gotcha. Well, if there are specific drawables that you just want to avoid scaling for, you can also create a `drawable-nodpi` folder for those graphics, and the system won't scale anything taken from there. – Kevin Coppock Sep 24 '12 at 14:52