getMeasuredHeight() 代表该view的实际高度
getHeight() 代表该view的显示在屏幕中的高度
getScrollY() 代表 父类parentview 左上角 在view中位置
案例分析:
scrollview 是否滑动到底部?
@Override
public boolean isAtBottom() {
int scrollY = mcoyScrollView.getScrollY();
int height = mcoyScrollView.getHeight();
int scrollViewMeasuredHeight = mcoyScrollView.getChildAt(0).getMeasuredHeight();
if ((scrollY + height) >= scrollViewMeasuredHeight) {
return true;
}
return false;
}
参考文章:* http://blog.csdn.net/bigconvience/article/details/26697645
* http://blog.csdn.net/androiddevelop/article/details/8373782
* http://blog.csdn.net/xujainxing/article/details/8985063