gpt4 book ai didi

android - 多设备混合应用程序 - 支持 Android 上的 xxhdpi 和 xxxhdpi 密度

转载 作者:行者123 更新时间:2023-11-29 01:39:19 25 4
gpt4 key购买 nike

我将 Visual Studio 2013 与多设备混合应用程序 CTP 2.0 结合使用。在项目模板中,有几个适用于 Android 的占位符启动画面和图标:ldpi、mdpi、hdpi 和 xhdpi 密度。如何获得对 xxhdpi 和 xxxhdpi 密度的支持?我试过以下:

  1. 将文件添加到 res/icons/android (icon-144-xxhdpi.png) 和 res/screens/android (screen-xxhdpi.png)
  2. 根据 Cordova docs 将图标规范添加到 config.xml

构建后 APK 文件中不存在 xxhdpi 图像。

最佳答案

目前 Visual Studio 不支持 xxhdpi 或 xxxhdpi,因此 xxhdpi.png 图像确实可以打包 (.apk)。 VS CPT2.0 支持以下列出的分辨率,您可以在此处查看不同平台的完整列表 http://msdn.microsoft.com/en-us/library/dn757053.aspx#VisualAssets

将 xxhdpi 或 xxxhdpi 资源包含到打包中的解决方法:

  1. 创建多设备混合应用项目或打开任何现有项目。
  2. 构建项目
  3. 转到 bld\Debug\platforms\android\res
  4. 为 xxhdpi 或 xxxhdpi res 添加文件夹,例如

enter image description here

  1. 构建项目。不要重建。

现在bld\Debug\platforms\android\res下的所有资源都将被添加到包(*.apk)

Visual Studio 多设备混合应用 CTP 2.0 中支持的图标和屏幕资源:

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

  • screen-xhdpi-landscape.png

  • screen-hdpi-landscape.png
  • screen-mdpi-landscape.png
  • screen-ldpi-landscape.png
  • screen-xhdpi-portrait.png
  • screen-hdpi-portrait.png
  • 屏幕-mdpi-portrait.png
  • 屏幕-ldpi-portrait.png

关于android - 多设备混合应用程序 - 支持 Android 上的 xxhdpi 和 xxxhdpi 密度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25767545/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com