「How to use the Feathers List component(リンク先へ) 」
を参考にしています。
FeathersExampleのソースコード(リンク先へ)
FeathersExampleを実行すると以下の画面になります
Listの表示と設定の流れ
ボタンサンプルからListサンプルへ表示を切り替える為に
exampleIndexの値を変更します。
FeathersExample.as
private function loaderInfo_completeHandler(event:Event):void { var exampleIndex:int; Starling.handleLostContext = true; Starling.multitouchEnabled = true; exampleIndex = 1;ListExample.as
this.removeEventListener(Event.ADDED_TO_STAGE, addedToStageHandler); this.theme = new MetalWorksMobileTheme(this.stage); var list:List = new List(); list.width = this.stage.stageWidth; list.height = this.stage.stageHeight; this.addChild(list); var listData:Object; var listTable:Array = []; for(var i:int=0;i<1000;i++) { listData = { text : i.toString()+":"+"アイテム" }; listTable.push(listData); } var groceryList:ListCollection = new ListCollection(listTable); list.dataProvider = groceryList; list.itemRendererProperties.labelField = "text"; list.itemRendererType = BasicItemRenderer;
0 件のコメント:
コメントを投稿