Example usage for android.view View getVerticalScrollbarPosition

List of usage examples for android.view View getVerticalScrollbarPosition

Introduction

In this page you can find the example usage for android.view View getVerticalScrollbarPosition.

Prototype

public int getVerticalScrollbarPosition() 

Source Link

Usage

From source file:org.cm.podd.report.fragment.SwipeRefreshFragment.java

protected boolean canViewScrollUp(View view) {
    if (android.os.Build.VERSION.SDK_INT >= 14) {
        // For ICS and above we can call canScrollVertically() to determine this
        return ViewCompat.canScrollVertically(view, -1);
    } else {/*from   w  w  w . ja  v a2 s  .  co m*/
        // Pre-ICS we need to manually check the first visible item and the child view's top
        // value
        return (view.getVerticalScrollbarPosition() > 0 || view.getTop() < view.getPaddingTop());
    }
}