【问题标题】:Windows Phone image not visibleWindows Phone 图像不可见
【发布时间】:2016-03-17 10:44:16
【问题描述】:

我有这个问题: 我正在 Windows Phone 平台上创建我的第一个应用程序,我像往常一样将图像文件放在文件夹 assets/images 中,但是当我运行应用程序时无法识别图像并且我看不到图像。

我的图片格式是png。

在 iOS 和 Android 上我没有任何问题。

拜托,你能帮帮我吗?

谢谢。

【问题讨论】:

  • 你有代码示例和图片吗?

标签: image windows-phone-8.1 appcelerator appcelerator-titanium


【解决方案1】:

这是我如何在 Android 和 Windows Phone 合金项目中处理此问题的方法。

1.在“assets/android/images”文件夹和“assets/windows/images”文件夹中粘贴PNG文件(large.png)。

  1. 在代码中访问图片如下。

    "#large": {

      image: 'images/large.png',

      height: Ti.UI.SIZE,
      width: Ti.UI.FILL

    }


    "#large[platform=android]": {

      image: '../../images/large.png'

    }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-02-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-02
    相关资源
    最近更新 更多