【问题标题】:Appcelerator App Designer assets path issue and RGBAAppcelerator App Designer 资产路径问题和 RGBA
【发布时间】:2017-05-29 04:26:55
【问题描述】:

我对 Appcelerator App Designer 有疑问。 我在 app/assets/iphone/images/MainBG.png 等资产中有一个图像路径 在xml中我需要使用/images/MainBG.png之类的路径 但是 App Designer 设置的路径(如 /iphone/images/MainBG.png)在我运行我的应用程序时不起作用......是的,我可以更改此路径,但之后我无法在 App Designer 视图中看到图像。

第二个问题: App Designer 不能使用 alpha... 是的,我可以手动设置 BGcolorrgba(150,0,0,0.5) 但在 App Designer 视图中我看不到结果。

谁能帮帮我? 对不起我的英语))

【问题讨论】:

    标签: ios iphone appcelerator appcelerator-titanium


    【解决方案1】:

    虽然我没有使用过 App Designer,但以下内容可能会对您有所帮助:

    • 将所有图片文件放在 app/assets/images 文件夹中
    • 现在在 XML 中设置路径,例如 image='/images/MainBG.png'

    手动设置背景颜色,可以使用以下组合:

    • 您可以使用 backgroundColor:"#fff"
    • 您也可以使用 backgroundColor:"#ffffff"
    • 这个也可以backgroundColor:"white"
    • 这个适用于 alpha - backgroundColor:"#abcd",在这种语法中,alpha 将是 'aa' 而 r/g/b 将是 bb/cc/dd
    • 所以这个也适用于 alpha - backgroundColor:"#aabbccdd",每个 alpha/red/green/blue 有 2 位数字

    【讨论】:

    • 是的,这都是工作。但不在 App Designer 中...对于 alpha - 我使用此“组合”,他们正在设备上工作,但在 App Designer 视图中我看不到结果... UPD:图像路径问题已解决!谢谢!
    • 可能是 App Designer 中的问题。使用 App Designer 的人将能够为您提供帮助。在此之前,请坚持使用手动代码。
    猜你喜欢
    • 2021-06-26
    • 2012-04-10
    • 2016-03-24
    • 2012-06-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-06-10
    • 1970-01-01
    相关资源
    最近更新 更多