AppbarLayout和CollapsingToolbarLayout在并发编程中的挑战(1)
发布时间
阅读量:
阅读量
<androidx.recyclerview.widget.RecyclerView
android:id=“@+id/rv_my_test”
android:layout_width=“match_parent”
android:layout_height=“match_parent”
app:layout_behavior=“@string/appbar_scrolling_view_behavior” />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
在这里,你得注意如下问题:
?attr/actionBarSize :表示 toolbar 的默认最小高度minHeight。
AppBarLayout 包含 CollapsingToolbarLayout 包含 Toolbar 这样的层级结构不可打乱
在App组件中的布局配置中应设置scrollFlags属性为‘scroll|exitUntilCollapsed’
当同时给CollapsingToolbarLayout和Toolbar组件指定android:layout_height属性为match_parent时
该属性app:layout_collapseMode
全部评论 (0)
还没有任何评论哟~
