Skip to content

Commit 01aa297

Browse files
committed
修改README
1 parent ea9e69d commit 01aa297

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,8 @@
66
2) 快速滑动AppBarLayout到折叠状态下,立马下拉会出现抖动现象;
77
3) 滑动AppBarLayout过程中,无法像RecyclerView那样通过手指按下停止滚动。
88

9-
## 问题展示
10-
![image](http://)
9+
## 如何使用
10+
TODO
11+
12+
## 参考
13+
https://blog.csdn.net/vite_s/article/details/78901767

appbarlayoutbehavior/src/main/java/com/yuruiyin/appbarlayoutbehavior/AppBarLayoutBehavior.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ public boolean onStartNestedScroll(CoordinatorLayout parent, AppBarLayout child,
8888

8989
@Override
9090
public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, View target, int dx, int dy, int[] consumed, int type) {
91-
//注意看ViewCompat.TYPE_TOUCH
9291
LogUtil.d(TAG, "onNestedPreScroll:" + child.getTotalScrollRange() + " ,dx:" + dx + " ,dy:" + dy + " ,type:" + type);
9392

94-
//返回1时,表示当前target处于非touch的滑动,
93+
//type返回1时,表示当前target处于非touch的滑动,
9594
//该bug的引起是因为appbar在滑动时,CoordinatorLayout内的实现NestedScrollingChild2接口的滑动子类还未结束其自身的fling
9695
//所以这里监听子类的非touch时的滑动,然后block掉滑动事件传递给AppBarLayout
9796
if (type == TYPE_FLING) {

0 commit comments

Comments
 (0)