How to get ViewSwitcher to wrap only the currently displayed view height?

后端 未结 1 915
予麋鹿
予麋鹿 2021-02-19 04:08

I\'m using a ViewSwitcher that lets me easily flip back and forth between two different List Headers with Animations built in.

However, the problem is the two views are

相关标签:
1条回答
  • 2021-02-19 04:51

    Set the measureAllChildren attribute on the ViewSwitcher to false.

    <ViewSwitcher
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:measureAllChildren="false">
    

    For more info see documentation.

    0 讨论(0)
提交回复
热议问题