25

I have a ViewFlipper which has some 10 views in it and each view is of different size (height wise). Everything is working fine. The problem is, the smaller views are getting padded(height) to make their height equal to the largest view. Is there a way to avoid this problem?

Thx! Rahul.

rahul
  • 6,447
  • 3
  • 31
  • 42

1 Answers1

85

Ok. I searched a bit more and found the following solution. Need to set the android:measureAllChildren to false in the ViewFlipper.

Lavekush Agrawal
  • 6,040
  • 7
  • 52
  • 85
rahul
  • 6,447
  • 3
  • 31
  • 42
  • 2
    Superb! Nailed it! I always thought this can't be fixed but today I was so stuck that I had to find a solution for ViewFlipper once and for all and found this, Cool! – sud007 Feb 15 '18 at 09:58
  • Great one! Helped me save a lot of time. – user1051505 Jul 26 '18 at 05:56