本文整理了Java中android.webkit.WebView.onScrollChanged()
方法的一些代码示例,展示了WebView.onScrollChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.onScrollChanged()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:onScrollChanged
暂无
代码示例来源:origin: CarGuo/GSYVideoPlayer
@Override
protected void onScrollChanged(final int l, final int t, final int oldl,
final int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mOnScrollListener != null) {
mOnScrollListener.onScroll(l, t, oldl, oldt);
}
}
代码示例来源:origin: ankidroid/Anki-Android
@Override
protected void onScrollChanged(int horiz, int vert, int oldHoriz, int oldVert) {
super.onScrollChanged(horiz, vert, oldHoriz, oldVert);
if (Math.abs(horiz - oldHoriz) > Math.abs(vert - oldVert)) {
mIsXScrolling = true;
scrollHandler.removeCallbacks(scrollXRunnable);
scrollHandler.postDelayed(scrollXRunnable, 300);
} else {
mIsYScrolling = true;
scrollHandler.removeCallbacks(scrollYRunnable);
scrollHandler.postDelayed(scrollYRunnable, 300);
}
}
代码示例来源:origin: GitLqr/LQRWeChat
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
LayoutParams lp = (LayoutParams) mProgressBar.getLayoutParams();
lp.x = l;
lp.y = t;
mProgressBar.setLayoutParams(lp);
super.onScrollChanged(l, t, oldl, oldt);
}
}
代码示例来源:origin: Rukey7/MvpApp
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
LayoutParams lp = (LayoutParams) mProgressBar.getLayoutParams();
lp.x = l;
lp.y = t;
mProgressBar.setLayoutParams(lp);
super.onScrollChanged(l, t, oldl, oldt);
}
代码示例来源:origin: ksoichiro/Android-ObservableScrollView
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (hasNoCallbacks()) {
return;
}
mScrollY = t;
dispatchOnScrollChanged(mScrollY, mFirstScroll, mDragging);
if (mFirstScroll) {
mFirstScroll = false;
}
if (mPrevScrollY < t) {
mScrollState = ScrollState.UP;
} else if (t < mPrevScrollY) {
mScrollState = ScrollState.DOWN;
} else {
mScrollState = ScrollState.STOP;
}
mPrevScrollY = t;
}
代码示例来源:origin: smuyyh/BookReader
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
mActivityCallback = (ReadEPubActivity) getContext();
mActivityCallback.hideToolBarIfVisible();
if (mScrollListener != null)
mScrollListener.onScrollChange(t);
super.onScrollChanged(l, t, oldl, oldt);
}
代码示例来源:origin: TakWolf/CNode-Material-Design
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (onScrollListenerList != null && onScrollListenerList.size() > 0) {
for (OnScrollListener onScrollListener : onScrollListenerList) {
onScrollListener.onScrollChanged(l, t, oldl, oldt);
}
}
}
代码示例来源:origin: huangweicai/OkLibDemo
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
//滚动时影响进度条位置
// LayoutParams lp = (LayoutParams) progressbar.getLayoutParams();
// lp.x = l;
// lp.y = t;
// progressbar.setLayoutParams(lp);
super.onScrollChanged(l, t, oldl, oldt);
}
代码示例来源:origin: wutq/AndroidModuleDemo
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
this.t = t;
super.onScrollChanged(l, t, oldl, oldt);
}
代码示例来源:origin: avluis/Hentoid
@Override
protected void onScrollChanged(final int l, final int t, final int oldl, final int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mOnScrollChangedCallback != null) mOnScrollChangedCallback.onScroll(l, t);
}
代码示例来源:origin: baiyuliang/QRobot
@SuppressWarnings("deprecation")
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
if (onScrollChangedListener != null) {
onScrollChangedListener.onScrollChanged(l, t);
}
super.onScrollChanged(l, t, oldl, oldt);
}
代码示例来源:origin: laizimo/richeditor
/**
* WebView的滚动事件
*
* @param l
* @param t
* @param oldl
* @param oldt
*/
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mOnScrollChangedCallback != null) {
mOnScrollChangedCallback.onScroll(l - oldl, t - oldt);
}
}
代码示例来源:origin: 7449/JsoupSample
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
if (progressbar != null) {
LayoutParams lp = (LayoutParams) progressbar.getLayoutParams();
lp.x = l;
lp.y = t;
progressbar.setLayoutParams(lp);
}
super.onScrollChanged(l, t, oldl, oldt);
}
代码示例来源:origin: pkhope/weibo
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
LayoutParams lp = (LayoutParams) progressbar.getLayoutParams();
lp.x = l;
lp.y = t;
progressbar.setLayoutParams(lp);
super.onScrollChanged(l, t, oldl, oldt);
}
}
代码示例来源:origin: byhieg/easyweather
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
LayoutParams lp = (LayoutParams) mProgressBar.getLayoutParams();
lp.x = l;
lp.y = t;
mProgressBar.setLayoutParams(lp);
super.onScrollChanged(l, t, oldl, oldt);
}
}
代码示例来源:origin: AdleyLong/RecyclerViewDemo
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
LayoutParams lp = (LayoutParams) progressbar.getLayoutParams();
lp.x = l;
lp.y = t;
progressbar.setLayoutParams(lp);
super.onScrollChanged(l, t, oldl, oldt);
}
内容来源于网络,如有侵权,请联系作者删除!