本文整理匯總了Java中android.widget.ScrollView.getMeasuredHeight方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrollView.getMeasuredHeight方法的具體用法?Java ScrollView.getMeasuredHeight怎麽用?Java ScrollView.getMeasuredHeight使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.widget.ScrollView
的用法示例。
在下文中一共展示了ScrollView.getMeasuredHeight方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isScrollViewToBottom
import android.widget.ScrollView; //導入方法依賴的package包/類
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;
}
示例2: onTouch
import android.widget.ScrollView; //導入方法依賴的package包/類
@Override
public boolean onTouch(View v, MotionEvent event) {
ScrollView sv = (ScrollView) v;
if (sv.getScrollY() == (sv.getChildAt(0).getMeasuredHeight() - sv.getMeasuredHeight()) && mCurrentViewIndex == 0){
canPullUp = true;
}else{
canPullUp = false;
}
return false;
}
示例3: canScrollViewScroll
import android.widget.ScrollView; //導入方法依賴的package包/類
private static boolean canScrollViewScroll(ScrollView sv) {
if (sv.getChildCount() == 0)
return false;
final int childHeight = sv.getChildAt(0).getMeasuredHeight();
return sv.getMeasuredHeight() - sv.getPaddingTop() - sv.getPaddingBottom() < childHeight;
}