I’m using the SpinnerList component in a flex mobile application, the spinner turn too fast for my need, is it any way to reduces its speed.
There is many answer regarding the speed of the mouse wheel but no answer concerning the spinner itself.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I did a quick look into flex source:
I think the SpinnerList scrolling is used by a normal Scroller just as with the a normal List component.
The Scroller class uses a TouchScrollHelper class. This class contains a calculateThrowVelocity() and this method uses some constants like VELOCITY_WEIGHTS
However, this method and consts are all private, so you won’t be able to modify it by extending the class. Furthermore, the touchScrollHelper property in Scroller is private as well.
So, I’m afraid the only way to modify the speed/inertia is to create a custom Scroller using a custom TouchScrollHelper by copying most of the code from the originals, but a custom calculateThrowVelocity() You can add your custom Scroller to the SpinnerList using a skin.