When using the CoordinatorLayout my ScrollView has an incorrect size

前端 未结 2 2067
时光取名叫无心
时光取名叫无心 2020-12-15 02:41

I\'m using a ScrollView in a layout, and am attempting to use the new CoordinatorLayout from the design support library.

My layout file looks like this:

<         


        
2条回答
  •  天涯浪人
    2020-12-15 03:25

    The standard ScrollView is only meant to be used as a parent. You need to change the ScrollView to a android.support.v4.widget.NestedScrollView.

    An example can be seen in the reference documentation for AppBarLayout.

提交回复
热议问题