Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Mobile - Problems with List and HorizontalLayout and pageScrollingEnabled

$
0
0
Here is my list:

<s:List id="myList" preventSelection="true"
percentWidth="100" percentHeight="100"
verticalScrollPolicy="{ScrollPolicy.OFF}"
itemRenderer="MyItemRenderer"
interactionMode="touch" pageScrollingEnabled="true"
dataProvider="{arrayOfFourElements}">
<s:layout>
<s:HorizontalLayout gap="1" />
</s:layout>
</s:List>

Strange things:

- when setting the gap to 0 the scrolling don't work anymore... a bug?

- I set the itemrenderers width to "width of the list - 1". The first item I
see is the second item and just scrolling 1 pixel will switch instantly with
a flashing to the first item (without scrolling) - another bug?

override protected function measure():void

super.measure();
var parent:DisplayObject = this.parent;
while(parent is List == false)

parent = parent.parent;

measuredWidth = parent.width > 1 ? parent.width - 1
: parent.width;
// this also will break the list...: parent.width - 1;

(Is there a better way to get the lists with from within an itemrenderer?)

Best regards,

Christian

Viewing all articles
Browse latest Browse all 5648

Trending Articles