Skip to content

Commit

Permalink
修改README
Browse files Browse the repository at this point in the history
  • Loading branch information
yuruiyin committed Jul 16, 2018
1 parent ea9e69d commit 01aa297
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
2) 快速滑动AppBarLayout到折叠状态下,立马下拉会出现抖动现象;
3) 滑动AppBarLayout过程中,无法像RecyclerView那样通过手指按下停止滚动。

## 问题展示
![image](http://)
## 如何使用
TODO

## 参考
https://blog.csdn.net/vite_s/article/details/78901767
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,9 @@ public boolean onStartNestedScroll(CoordinatorLayout parent, AppBarLayout child,

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

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

0 comments on commit 01aa297

Please sign in to comment.