views:

37

answers:

2

I have a ViewFlipper implementation that needs to be improved. This ViewFlipper has three child views. Basically, I want an indicator on which child view is currently active. My ViewFlipper is just a part of a complex layout which also has list views, etc.

Switching of views is also automatic and done in a specified interval.

From Android's SDK reference, I haven't seen any listener for when the ViewFlipper changes the child view.

Do you guys know of a way I can have a listener for that event?

Or are there alternative ways I can implement this feature besides using ViewFlipper ?

Thanks!

A: 

If you apply animation (out or in animation) on view switching, you can set listener to an animation and, for example, act on animation end.

Konstantin Burov
+1 Thanks! That nailed it. I was using xml based animation parameters so I totally missed that. So I now created the ViewFlipper animation parameters inside my Activity instead of having it in my xml.
Shane Oliver