noties / Scrollable

Android scrollable tabs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

use ScrollableLayout has a quickreturn

sgueniot opened this issue · comments

Hello,
thanks for this great lib.
Sometimes i would like to show header before scroll list.
I use this code :

     mScrollableLayout.setCanScrollVerticallyDelegate(new CanScrollVerticallyDelegate() {
            @Override
            public boolean canScrollVertically(int direction) {
                if(direction<0){
                    if(mScrollableLayout.getScrollY()==0){ //header is visible
                        return mListPlayers.canScrollVertically(direction);
                    }else{
                        return false;
                    }
                }
                return mListPlayers.canScrollVertically( direction);
            }
        });

Boolean return value seems to be ok, but i'm not able to scroll the list after scrollbarLayout scrolls to top without touch up and touch down.

What can I change to do that ?
Thanks.