简体   繁体   English

在Adobe Flex Mobile中拆分视图

[英]Split View in adobe flex mobile

I have four views: 1.SplitView (main view) 2.SplitViewHomeView(root Panel) 3.SimpleView(Right panel) 4.Details(child of Right Panel View). 我有四个视图:1.SplitView(主视图)2.SplitViewHomeView(根面板)3.SimpleView(右侧面板)4.Details(右侧面板视图的子级)。 I am trying to accomplish the split view as in Ipad in adobe flex mobile.But unable to connect the root panel to right panel...Can any one suggest the path to me.My Code is below 我正在尝试在Adobe Flex Mobile的Ipad中完成拆分视图。但是无法将根面板连接到右面板...任何人都可以建议我的路径。

Split View ** 拆分视图 **

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
    <s:ViewNavigator id="MainView" left="0" width="300" height="748" firstView="views.SplitViewHomeView"/>
    <s:ViewNavigator id="MainView1" left="301" width="732" height="748" firstView="views.SimpleView"/>

</s:Application>

** SplitViewHomeView ** ** SplitViewHomeView **

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark" title="Root View"
        creationComplete="srv.send()">
    <fx:Declarations>
        <s:HTTPService id="srv" url="assets/employees.xml"/>
    </fx:Declarations>
    <s:List id="list" top="0" bottom="0" left="0" right="0"
            dataProvider="{srv.lastResult.list.employee}">

        <s:itemRenderer>
            <fx:Component>
                <s:IconItemRenderer
                    label="{data.Name} {data.Founder}"
                    messageField="title"/>
            </fx:Component>

        </s:itemRenderer>
    </s:List>

</s:View>

** Simple View ** **简单视图**

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark" title="Home View"
        creationComplete="srv.send()">
    <fx:Declarations>
        <s:HTTPService id="srv" url="assets/employees.xml"/>
    </fx:Declarations>
    <s:List id="list" top="0" bottom="0" left="0" right="0"
            dataProvider="{srv.lastResult.list.employee}"
            change="navigator.pushView(Details, list.selectedItem)">
        <s:itemRenderer>
            <fx:Component>
                <s:IconItemRenderer
                    label="{data.Name} {data.Founder}"
                    messageField="title"/>
            </fx:Component>
        </s:itemRenderer>
    </s:List>

** DetailsView ** **详细信息查看**

<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        title="Details">

    <s:HGroup verticalAlign="middle" gap="12">
        <s:Image source="assets/pics/{data.picture}"/>
        <s:VGroup>

        </s:VGroup>
    </s:HGroup>
    <s:navigationContent>
        <s:Button label="Back" click="navigator.popToFirstView()"/>
    </s:navigationContent>


</s:View>

** **

Check out the open source eskimo library 查看开源爱斯基摩人库

Download the zip and look for the SplitViewApplication.as or SplitView.as These components will do exactly what you are looking for. 下载zip并查找SplitViewApplication.asSplitView.as这些组件将完全满足您的需求。

Cheers 干杯

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

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