Search code examples
androidviewflipper

Android ViewFlipper back to first view


My viewFlipper contains 15 LinearLayout. After it reaches, I have a button "Back to menu".

I've used

showNext()

all the way to the 15th LinearLayout. And now I want it to go back to 1st LinearLayout. Anyone have any idea? How to bring it back to 1st Linearlayout?

Thanks.


Solution

  • Call showNext(). Or, call setDisplayedChild(0).