FLex 4.5 : strange scrolling behaviour in custom layout used in a list
I created a custom layout for a list, to be used on a mobile (android). I used this as example : http://corlan.org/2011/07/11/creating-flex-mobile-lists-part-ii-using-virtualization, using virtualization.
Now the problem I have is with scrolling : when scrolling to the bottom of the list, there seems to be always a "bounce back", as if the list would have reached and as if the bounce/pull effect is taking place. But in fact the list has not reached the end at all, in fact I can not even scroll to the last element in the list. When going back from bottom to top, there's no problem at all.
I trace the top and bottom of the Scrolling Rectangle (Rectangle.getScrollRect) and there I can see that when scrolling down, the top and bottom parameters increase, but when releasing the touchscreen, all of a sudden the parameters decrease again with a certain amount, and so never reaching the end of the list.
All my code is available on google project hosting : http://code.google.com/p/helpdiabetes-air/source/browse/trunk/sr开发者_C百科c/myComponents/TrackingViewLayout.as
solved. Double checked with the example given by Mihai Corlan and actually I had left out one statement at the end of function measure :
layoutTarget.setContentSize(dataGroupTarget.width, totalHeight);
works fine now.
精彩评论