-1

Per the Cordova docs, you can specify icon files in config.xml, for various densities on Android. For example:

<icon src="www/res/android/mdpi/launcher-icon.9.png" density="mdpi" />
<icon src="www/res/android/hdpi/launcher-icon.9.png" density="hdpi" />

But Android uses other icons, such as those listed on this page: http://developer.android.com/design/style/iconography.html#small-contextual

Examples include status bar, dialog, tab, menu and action bar icons.

By default, I can see Android automatically uses the mdpi icon I've specified in config.xml, for the Action bar icon (I'm referring to the gray dialog that lets you close the app - I'm not sure what that is called on Android); however, I'm not explicitly specifying an Action bar icon in my config.xml. And the problem is, my mdpi icon is a 9-patch PNG, and for some reason Android displays this image at a smaller resolution, rendering the extra black 9-patch pixels around the icon for some reason.

Is there a way to specify the other iconography in the Cordova config.xml, or does this have to be done as a separate step in Android Studio?

blakeage
  • 259
  • 5
  • 14

1 Answers1

0

9-patch images are not supported for Android Launch Icons, only for app-internal images. This is why the extra 9-patch pixels were displaying. The background on the emulator was black, so I couldn't see the black pixels that were also on my main launch icon as well.

Reference: Android - Launcher Icon Size

Community
  • 1
  • 1
blakeage
  • 259
  • 5
  • 14