when scrolled to the top or bottom of the list,it could continue scrolling through it would be back to the top or bottom after you release your finger.
if i want to prevent continuing scrolling when the list is at the top and bottom,how could i do?
<?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"
xmlns:com="com.*"
xmlns:model="model.*"
creationComplete="onInit()" backgroundColor="0xff0000">
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import model.ItemData;
import mx.collections.ArrayCollection;
[Bindable]
private var dp:ArrayCollection = new ArrayCollection();
protected function onInit():void{
for (var i:int = 0; i < 100; i++) {
var item:ItemData = new ItemData(i, 'A' + i.toString());
dp.addItem(item);
}
dp.refresh();
list.ensureIndexIsVisible(70);
}
]]>
</fx:Script>
<s:VGroup x="10" width="100%" >
<s:Label x="10" text="ListDemo:" width="100%"/>
<s:List id="list" x="10" height="200"
itemRenderer="views.MyItemRenderer"
dataProvider="{dp}">
</s:List>
</s:VGroup>
</s:View>
maybe u have not understood me,to put it clearly,i will show u another demo.
here i will show 10 numbers 0-9 in the list,to be clear i extend the item height.
when at the top of the list,touch the list u'd see:
at this moment,u scroll the list down, u'd see if u dont release your finger
when release your finger,u'd see:
North America
Europe, Middle East and Africa
Asia Pacific