tags:

views:

213

answers:

1

Hi guys,

I am using "ViewFlipper" for my application.

This ViewFlipper includes 5 layouts. I am trying make it that can be changed from current layout to any layout. In other words, it can be changed Layout#1 -> Layout#5 or Layout#4 -> Layout#1 ..etc.

How to make it ?

I used showNext() and showPrevious(). It is not better idea for my case.

Can I use ViewSwither instead of this case ?

Please advice.

Can you give example code related this issue ?

Thanks in advance.

A: 

You can use the method setDisplayedChild (defined in ViewAnimator, the superclass of ViewFlipper) passing in the child index that you want to display.

Steve