EverythingMe / overscroll-decor

Android: iOS-like over-scrolling effect applicable over almost all scrollable Android views.
BSD 2-Clause "Simplified" License
2.85k stars 400 forks source link

added adapter for NestedScrollView, added implementation and demo for… #54

Open danubis opened 6 years ago

danubis commented 6 years ago

Original version does not work with view inside SwipeRefreshLayout, because Decorator handled OnTouchEvent. I added a new adapter for NestedScrollView with a boolean to state whether user wants to enable compatibility to work with SwipeRefreshLayout.

OverScrollDecoratorHelper.setUpOverScroll(scrollView, enableSwipeToRefresh: true);

By having enableSwipeToRefresh true, over scroll from top will be disabled as well.