Overlaying content above AppBarLayout using new Material Design

后端 未结 4 725
伪装坚强ぢ
伪装坚强ぢ 2020-12-23 10:02

I want to achieve something like that. (not the FAB or the Snackbar). How can i create a layout, overlaying the AppBarLayout? Like this! (For Example)

4条回答
  •  臣服心动
    2020-12-23 10:42

    Just add something like

    app:behavior_overlapTop="64dp"
    

    to your NestedScrollView and it will be placed above the expanded toolbar.

    In addition, you should add something like

    app:expandedTitleMarginBottom="70dp"
    

    to your CollapsingToolbarLayout so the title does not appear under your overlaid scroll content.

提交回复
热议问题