简体   繁体   English

使用flex4 sparks控件创建自定义chrome adobe air桌面应用程序

[英]create custom chrome adobe air desktop application using flex4 sparks controls

I have googled around but the only resource for teaching me how to create an Adobe Air Desktop Application uses mx controls instead . 我已经google了,但教我如何创建Adobe Air桌面应用程序的唯一资源是使用mx控件

inside app-xml i have set transparent to true and systemChrome to none . 在app-xml中,我将transparent设置true ,将systemChrome设置为none

the following is my main mxml 以下是我的主要mxml

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       xmlns:dragdrop="org.robotlegs.demos.draganddrop.*"
                       xmlns:view="org.robotlegs.demos.draganddrop.view.*"
                       mouseOver="layoutCanvas.visible = true;"
                       mouseOut="layoutCanvas.visible = false;"
    >

    <fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace mx "library://ns.adobe.com/flex/mx";

        s|Application {
            background-alpha:"0.7"; 
            padding: 0px;

        }
    </fx:Style>


    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <dragdrop:DragAndDropContext contextView="{this}"/>
    </fx:Declarations>

    <s:Image id="background" width="100%" height="100%"
             source="@Embed('theme/assets/MaxBackground.png')"/>

    <s:BorderContainer id="layoutCanvas" width="100%" height="100%" visible="false">
        <s:Image id="applicationClose" right="5" top="2"
                 click="stage.nativeWindow.close()"
                 source="@Embed('theme/assets/buttons/CLOSE WINDOW icon.png')"/>
        <s:Image id="applicationMaximize" right="25" top="2"
                 click="stage.nativeWindow.maximize()"
                 source="@Embed('theme/assets/buttons/EXPAND WINDOW icon.png')"/>
        <s:Image id="applicationMinimize" right="45" top="2"
                 click="stage.nativeWindow.minimize()"
                 source="@Embed('theme/assets/buttons/COLLAPSED WINDOW icon.png')"/>

    </s:BorderContainer>


</s:WindowedApplication>

I have two issues. 我有两个问题。

1) the initial application window size. 1)初始应用程序窗口大小。 How can i set this to 100% full screen? 如何将其设置为100%全屏? 2) there is a strange grey horizontal footer at the bottom. 2)底部有一个奇怪的灰色水平页脚。 How do i get rid of it? 我怎么摆脱它? See here 看到这里

I do not wish to use mx controls. 我不想使用mx控件。 I want to use sparks controls as much as possible. 我想尽可能多地使用sparks控件。

Thank you. 谢谢。

1) the initial application window size. 1)初始应用程序窗口大小。 How can i set this to 100% full screen? 如何将其设置为100%全屏?

To do this you can add a CREATION_COMPLETE handler to your application and within that handler add a line similar to: 为此,您可以向应用程序添加CREATION_COMPLETE处理程序,并在该处理程序中添加类似于以下内容的行:

this.maximize() where this is you WindowedApplication. this.maximize() this是你WindowedApplication。

2) there is a strange grey horizontal footer at the bottom 2)底部有一个奇怪的灰色水平页脚

From the sounds of it, this is the status bar. 从声音来看,这是状态栏。 Try setting the showStatusBar property on you WindowedApplication root tag to false : 尝试将WindowedApplication根标记上的showStatusBar属性设置为false

showStatusBar="false"

Hope this helps. 希望这可以帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM