开发者

Table component in Adobe Air for mobile devices

Is there any fast table components available for mobile开发者_开发知识库 devices (Android ,iOS) in Adobe Air?


I think I know where your coming from with this question.. no mobile datagrid.

I used a combination of a List and ItemRenderer - has f all functionality, but I just needed to display the data and accept a click on a certain row. May point you in right direction.

AccountItemRenderer:

<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                xmlns:s="library://ns.adobe.com/flex/spark"
                width="100%"
                height="85">

    <fx:Declarations>
        <s:SolidColor id="normalColor" color="#000000"/>
        <s:SolidColor id="hoveredColor" color="#FF0000"/>
    </fx:Declarations>

    <s:states>
        <s:State name="normal"/>
        <s:State name="hovered"/>
    </s:states>

    <s:layout>
        <s:HorizontalLayout/>
    </s:layout>

    <s:Ellipse fill="{normalColor}" fill.hovered="{hoveredColor}"
               width="10" height="10" />

    <s:Label text="{data.limit}" />
    <s:Label text="{data.exp}" />
    <s:Label text="{data.number}"/>


</s:ItemRenderer>

In my View class I used the item renderer as follows:

<s:Scroller left="10" right="10" top="10" bottom="70" verticalScrollPolicy="on" visible="true">
        <s:VGroup paddingTop="3" paddingLeft="5" paddingRight="5" paddingBottom="3">
            <s:List id="pseudoDataGrid" width="100%" height="100%" 
                         itemRenderer="views.itemrenders.AccountItemRenderer"
                         click="dataGridGroup_clickHandler(event)">
                <s:layout>
                    <s:VerticalLayout gap="1" />
                </s:layout>
            </s:List>           
        </s:VGroup>
    </s:Scroller>

and at some point I set: pseudoDataGrid.dataProvider = model.accounts;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜