本文整理了Java中android.webkit.WebView.onOverScrolled()
方法的一些代码示例,展示了WebView.onOverScrolled()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.onOverScrolled()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:onOverScrolled
暂无
代码示例来源:origin: WelliJohn/StickScrollView
@Override
protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
super.onOverScrolled(scrollX, scrollY, clampedX, clampedY);
if (scrollY == 0) {
isScrolledToTop = clampedY;
isScrolledToBottom = false;
} else {
isScrolledToTop = false;
isScrolledToBottom = clampedY;
}
}
//
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
super.onOverScrolled(scrollX, scrollY, clampedX, clampedY);
this.ensureDecorator();
mDecorator.onOverScrolled(scrollX, scrollY, clampedX, clampedY);
}
代码示例来源:origin: mengzhidaren/RecylerViewMultiHeaderView
@Override
protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
super.onOverScrolled(scrollX, scrollY, clampedX, clampedY);
int extent = computeVerticalScrollExtent();//可见范围
int offset = computeVerticalScrollOffset();//偏移范范围 到顶为0 offset == scrollY
int range = computeVerticalScrollRange();//总范围
isToBottomState = range - (extent + offset) <= webViewBottomOffset;
if (clampedY && isToBottomState) {//到底
int velocity = mViewFlinger.getCurrVelocity();
// RecyclerViewMultiHeader.i("WebViewProxy", "到底速度:" + velocity);
if (velocity > 0 && onCallBackVelocity != null)
onCallBackVelocity.callBackVelocity(velocity);
}
if(scrollBar!=null){
scrollBar.onProgressWebView(extent,offset,range);
}
}
内容来源于网络,如有侵权,请联系作者删除!