多设备应用程序的混合 - 在Android上xxhdpi和xxxhdpi密度支持 [英] Multi Device Hybrid Apps - support for xxhdpi and xxxhdpi densities on Android

查看:282
本文介绍了多设备应用程序的混合 - 在Android上xxhdpi和xxxhdpi密度支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Visual Studio 2013与多设备应用的混合CTP 2.0。在项目模板,有几个占位splashscreens和图标为Android:LDPI,MDPI,华电国际和xhdpi密度。我怎样才能得到xxhdpi和xxxhdpi密度的支持?我尝试以下操作:

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. 添加文件到 RES /图标/ Android版(图标-144-xxhdpi.png)和 RES /屏幕/ Android版(屏幕xxhdpi.png)

  2. 添加图标规格根据<一个config.xml中href=\"https://cordova.apache.org/docs/en/3.5.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens\"相对=nofollow>科尔多瓦文档

  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

该xxhdpi图像不是在构建后的APK文件present。

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

推荐答案

目前的Visual Studio不支持xxhdpi或xxxhdpi,因此 xxhdpi.png图像确实使包装(的.apk文件)。 VS CPT2.0支持下列分辨率,你可以看到在这里跨越不同平台的 http://msdn.microsoft.com/en-us/library/dn757053.aspx#VisualA​​ssets

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

解决方法包括xxhdpi或xxxhdpi资源包:

Workaround to include xxhdpi or xxxhdpi resources to package:


  1. 创建的多设备应用混合项目或打开任何现有的项目。

  2. 生成项目

  3. 前往BLD \\调试\\ \\平台的Andr​​oid \\ RES

  4. 添加文件夹xxhdpi或xxxhdpi RES像


  1. 生成项目。不要重新构建。

现在下的所有资源present BLD \\调试\\ \\平台的Andr​​oid \\ RES 将被添加到包(* .apk文件)

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

在Visual Studio中多设备的复合载体图标和屏幕资源应用CTP 2.0:

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


  • 图标-36 ldpi.png

  • 图标-48-mdpi.png

  • 图标-72 hdpi.png

  • 图标-96 xhdpi.png

  • 图标-96 xhdpi.png

  • icon-36-ldpi.png
  • icon-48-mdpi.png
  • icon-72-hdpi.png
  • icon-96-xhdpi.png
  • icon-96-xhdpi.png

屏幕xhdpi-landscape.png

screen-xhdpi-landscape.png

这篇关于多设备应用程序的混合 - 在Android上xxhdpi和xxxhdpi密度支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆