Code Monkey home page Code Monkey logo

alibehaver's Issues

下拉刷新与头部伸缩冲突

问题:当头部完全展开时,下拉出现下拉刷新头。此时手指头上滑,应该先隐藏下拉刷新头,而不是收缩头部
建议:behavior的onNestedPreScroll方法中,在判断是否调整布局之前加入如下判断
if (child instanceof BasicRefrushRecycleView) {
BasicRefrushRecycleView recycleView = (BasicRefrushRecycleView) child;
if (null != recycleView.getEndView() && recycleView.getEndView().getHeight() > 0) {
return;
}
}

代码目的性不明确

问题:behavior的onStopNestedScroll方法中,如下代码段:
if (isExpand) {
float pro = ((translationY - height) * 1.0f / heardSize);
creatExpendAnimator(translationY, height, (int) (500 * pro));
}
目的性不是很明了。能请作者说明下什么情况下会触发这段代码吗 ?实际测试这段代码是有用的,不过将这段代码注释掉,将下一行的条件判断:
if (!isScroll && height > minHeard && height < heardSize)
改为:
if (!isScroll && height >= minHeard && height <= heardSize)
似乎也能起到同样的效果。不太懂。。。请指教

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.