遇到的问题:
最近痴迷MaterialDesign控件的学习,可以说CoordinatorLayout
+AppBarLayout
+CollapsingToolbarLayout
+NestedScrollView
是标配,我们都知道NestedScrollView
和ScrollView
只能有一个直接子布局,所以当想展示多个View时就会想到用LinearLayout
或其他布局嵌套的方式来实现,但实际使用遇到了问题,如图所示:
NestedScrollView
里嵌套了
LinearLayout
,
NestedScrollView
无法滑动到底部,以至于看不到
Button
当我们去掉下面一行代码时就可以看到
app:layout_behavior="@string/appbar_scrolling_view_behavior"
复制代码
可是为了实现AppBarLayout
的折叠效果,又必须加上,百度无效,群里没人帮,只能翻墙来看了