开发者

Horizontal List or Carousel for Flex mobile?

Im creating a person search interface in Adobe Flex / Actionscript where we have an image for each person and a bit of text. Im looking to implement some like this:

HorizontalList Interface

OR

Carousel Interface

Both of these p开发者_开发百科ackages are unfortunately only for desktop Flex, I was wondering if anyone knew mobile flex (particularly Blackberry Playbook) alternatives?

Thanks Phil


If you're using the standard s:List, you can change its layout property to a HorizontalLayout instance.

Basically, something like this:

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


Maybe you could use a TileList instead. This is a horizontal list that automatically uses the next row if the page is full. You can fill it with data by using the DataProvider tag.

Here is an example:

<mx:TileList id="tileList" borderStyle="none" paddingBottom="0"
paddingTop="5" paddingLeft="5" paddingRight="5" itemClick="onClickHandler(event)"
dataProvider="{yourArrayList}" itemRenderer="renderer.WidgetRenderer" />

The class widgetrenderer creates my imageButtons (so normal images can be used too). These buttons are made of the data in my arraylist that can be approached by data.(the item in the arraylist his properties) If you need the clicked item you can use the id of your tilelist and choose for selected item.

In this example:

var object:Object = tileList.selectedItem;

I don't know if you understand my explanation, if not feel free to ask. I hope this could help you.


There is a perfect example of this in tour de flex that uses a custom layout with the postLayoutTransform properties to build the 3d effect.

I don't know how to link to the specific example, but if you go here just click on Other Components -> Layouts -> Carousel

Cheers!


Horizontal List should work fine on mobile!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜