androidassetsvisual-studio-cordova

Multi Device Hybrid Apps - support for xxhdpi and xxxhdpi densities on Android


I'm using Visual Studio 2013 with the Multi-Device Hybrid Apps CTP 2.0. In the project template, there are several placeholder splashscreens and icons for Android: ldpi, mdpi, hdpi and xhdpi densities. How can I get support for xxhdpi and xxxhdpi densities? I tried following:

  1. Added files to res/icons/android (icon-144-xxhdpi.png) and res/screens/android (screen-xxhdpi.png)
  2. Added icon specification to config.xml according to Cordova docs

The xxhdpi images are not present in the APK file after a build.


Solution

  • Currently Visual Studio does not support xxhdpi or xxxhdpi and therefore xxhdpi.png images does make it to package (.apk). VS CPT2.0 supports below listed resolution and you can see the complete list across different platforms here http://msdn.microsoft.com/en-us/library/dn757053.aspx#VisualAssets

    Workaround to include xxhdpi or xxxhdpi resources to package:

    1. Create the Multi-Device Hybrid Apps project or open any existing project.
    2. Build the project
    3. Go to bld\Debug\platforms\android\res
    4. Add folder for xxhdpi or xxxhdpi res like

    enter image description here

    1. Build the project. Do not re-build.

    Now all the resources present under bld\Debug\platforms\android\res will be add to package (*.apk)

    Supported icon and screen resources in Visual Studio Multi-Device Hybrid Apps CTP 2.0: