Search code examples
androidmemory-managementimageviewviewflipperreusability

Is it possible to reuse the views in ViewFlipper?


May be a dumb Question.But still, is it possible to reuse the views in viewflipper? Now,i have three imageviews in a viewflipper.is it possible to have a single imageview and change the source to it?


Solution

  • You can probably reuse view if you want to take care of the bookkeeping your self. However the viewflipper requires at least 2 views. From the Android ViewFlipper Docs:

    Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip between each child at a regular interval.