@@ -0,0 +1,942 @@
+package com.trebuh.clarity;%0A%0Aimport android.support.v7.widget.RecyclerView;%0A%0Apublic abstract class HidingScrollListener extends RecyclerView.OnScrollListener %7B%0A    private static final int HIDE_TRESHOLD = 20;%0A    private int scrolledDist = 0;%0A    private boolean controlsVisible = true;%0A%0A    @Override%0A    public void onScrolled(RecyclerView recyclerView, int dx, int dy) %7B%0A        super.onScrolled(recyclerView, dx, dy);%0A%0A        if (scrolledDist %3E HIDE_TRESHOLD && controlsVisible) %7B%0A            onHide();%0A            controlsVisible = false;%0A            scrolledDist = 0;%0A        %7D else if (scrolledDist %3C -HIDE_TRESHOLD && !controlsVisible) %7B%0A            onShow();%0A            controlsVisible = true;%0A            scrolledDist = 0;%0A        %7D%0A%0A        if ((controlsVisible && dy %3E 0) %7C%7C (!controlsVisible && dy %3C 0)) %7B%0A            scrolledDist += dy;%0A        %7D%0A    %7D%0A%0A    public abstract void onHide();%0A    public abstract void onShow();%0A%7D%0A

create hidingScrollListener for toolbar hide on scroll