-
28 Aug 2012 12:27 AM #1
Answered: Can be list cycled?
Answered: Can be list cycled?
I want cycled behaviour: when the list is over, it should start from the beginning. Is it possible?
-
Best Answer Posted by mitchellsimoens
You can listen to the scrollend event on the Scroller and then scroll to the top...
Code:var scroller = list.getScrollable().getScroller(); function onScrollEnd() { this.scrollToTop(true); //true for anim, false for no anim } scroller.on('scrollend', onScrollEnd, scroller);
-
30 Aug 2012 4:09 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,637
- Vote Rating
- 435
- Answers
- 3106
You can listen to the scrollend event on the Scroller and then scroll to the top...
Code:var scroller = list.getScrollable().getScroller(); function onScrollEnd() { this.scrollToTop(true); //true for anim, false for no anim } scroller.on('scrollend', onScrollEnd, scroller);Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
30 Aug 2012 5:35 AM #3
Can you give this example for
, please?Code:xtype: 'list'
-
30 Aug 2012 6:31 AM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,637
- Vote Rating
- 435
- Answers
- 3106
The code I gave will work for a list hence it using the list variable that you have to come up with (resolve)
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
11 Sep 2012 6:31 PM #5
Thanks for advice, but scrollend fire when scroll ended, but not list
So i added condition like:
Code:if (y >= scroller.maxPosition.y)


Reply With Quote