android toolbar 底部,android - AppBarLayout.ScrollingViewBehavior-屏幕底部视图底部 - 堆栈内存溢出...

当使用AppBarLayout与标准ScrollingViewBehavior ,该AppBarLayout的兄弟姐妹会被默认的CoordinatorLayout和兄弟姐妹的底部的高度将由AppBarLayout的高度屏幕之外。

在我的用例中, NestedScrollView只是允许工具栏折叠的一种工具,同时在可折叠工具栏下方显示另一个可滚动视图(在这种情况下为碎片)。 片段是包含固定视图的片段(在这种情况下为FAB)

下面的图片演示了我正在描述的问题,提供的代码是导致问题的基本XML。

android:id="@+id/coordinatorLayout"

android:layout_width="match_parent"

android:layout_height="match_parent"

xmlns:app="http://schemas.android.com/apk/res-auto"

xmlns:android="http://schemas.android.com/apk/res/android">

android:id="@+id/appBarLayout"

android:layout_width="match_parent"

android:layout_height="wrap_content">

android:id="@+id/toolbar"

android:layout_width="match_parent"

android:layout_height="?attr/actionBarSize"

app:layout_scrollFlags="scroll|enterAlways" />

android:id="@+id/nestedScrollView"

android:layout_width="match_parent"

android:layout_height="match_parent"

app:layout_behavior="@string/appbar_scrolling_view_behavior">

android:id="@+id/fragmentHolder"

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:orientation="vertical">

aHR0cHM6Ly9pLnN0YWNrLmltZ3VyLmNvbS9JRUw3eS5wbmc=3c02c9dec246e24066bdcf4c30a6625e.pngfb38ce50a6388b69f9e0ff69b6537c7a.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值