Example usage for android.widget ScrollView getPaddingBottom

List of usage examples for android.widget ScrollView getPaddingBottom

Introduction

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

Prototype

public int getPaddingBottom() 

Source Link

Document

Returns the bottom 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 www. ja v  a 2s  . c om*/
    }
    return false;
}

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

/**
 * ScrollView?/* ww  w  .j  ava  2  s. c  om*/
 */
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;
}