Animating ListView.currentIndex?
While ListView is mostly controlled by user touching the screen, you sometimes need to set the current item (ListView.currentIndex) programatically. Is there any way to control the animation associated with this?
Ok, here is an example: In the Parallax example in SDK (under modelview), you can swipe between multiple home screen. You can also switch between the screens by clicking the icons on the bottom:
[url]http://doc.qt.nokia.com/latest/declarative-modelviews-parallax-qml-parallaxview-qml.html[/url]
Now, if you are on the first page and click the icon for the last page, you will see a very slow page transition :( I would like to replace that with something else. Is it possible??
I have already tried to set a Behaviour on contentX but that didn't work. I also played with maximumFlickVelocity and alike, but those are platform dependent and undocumented and probably not related to this animation anyway.
Any ideas?
Re: Animating ListView.currentIndex?
Hi,
You are talking about the highlight animation.
ListView API exposes some properties which could be changed to customize the animation of the built-in highilight component.
The properties I'm talking about are: highlightMoveDuration and so on.
Re: Animating ListView.currentIndex?
You are correct, highlightMoveDuration does seems to do the job.
Thank again gnuton, your help is very much appreciated!