I have a ListView and one of the rows (the first one) is a ViewFlipper.
Now, My problem is that when the ViewFlipper is scrolled out of the screen and back it gets reused. Usually it is a good thing to reuse only, but in my case when the ViewFlipper is recycled its starting from scratch.
I have 5 images in it and for example if the ViewFlipper was on the second image and you scrolled it out of the screen and back, its getting back to the first image. The timing and images are important since it is in sync with other components on screen and after reusing its out of sync.
So, How can I make the ViewFlipper continue running when its out of the screen so it will get back to the exact position and timing when its back on?
To prevent the recycling of the row containing the
ViewFlipper(and because this row is the first one) you could simply set it as the header view for theListView(but you’ll need to set the header view before setting the adapter). Another approach would be to keep somewhere the current position in theViewFlipperand when the row containing thisViewFlipperwill be requested you would reset theViewFlipper‘s position based on that saved position in thegetViewmethod.