注:记一次问题(花了三个小时)尝试给控件设置焦点(没效果)
-
问题复现
- AppBarLayout+NestedScrollView(并给NestedScrollView设置以下代码)
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
2:在根布局使用轮播图当屏幕塞满滑到底部的时候,会自动向上滚动至轮播图或者说是顶部
-
解决问题
- 不采用NestedScrollView XML:app:layout_behavior属性设置给一个布局控件即可,例如
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"/>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)