Example usage for android.widget ScrollView getPaddingTop

List of usage examples for android.widget ScrollView getPaddingTop

Introduction

In this page you can find the example usage for android.widget ScrollView getPaddingTop.

Prototype

public int getPaddingTop() 

Source Link

Document

Returns the top padding of this view.

Usage

From source file:cn.bingoogolapple.refreshlayout.util.BGARefreshScrollingUtil.java

public static boolean isScrollViewToBottom(ScrollView scrollView) {
    if (scrollView != null) {
        int scrollContentHeight = scrollView.getScrollY() + scrollView.getMeasuredHeight()
                - scrollView.getPaddingTop() - scrollView.getPaddingBottom();
        int realContentHeight = scrollView.getChildAt(0).getMeasuredHeight();
        if (scrollContentHeight == realContentHeight) {
            return true;
        }/*from   w w w . j  av a2  s  .  c  om*/
    }
    return false;
}

From source file:com.lanma.customviewproject.utils.ScrollingUtil.java

/**
 * ScrollView?//from  ww w. j a v a 2 s . c  o m
 */
public static boolean isScrollViewToBottom(ScrollView scrollView) {
    if (scrollView != null) {
        int scrollContentHeight = scrollView.getScrollY() + scrollView.getMeasuredHeight()
                - scrollView.getPaddingTop() - scrollView.getPaddingBottom();
        int realContentHeight = scrollView.getChildAt(0).getMeasuredHeight();
        if (scrollContentHeight == realContentHeight) {
            return true;
        }
    }
    return false;
}

From source file:org.openmrs.mobile.activities.addeditpatient.AddEditPatientFragment.java

@Override
public void scrollToTop() {
    ScrollView scrollView = (ScrollView) this.getActivity().findViewById(R.id.scrollView);
    scrollView.smoothScrollTo(0, scrollView.getPaddingTop());
}