本文整理了Java中android.widget.HorizontalScrollView.onScrollChanged()
方法的一些代码示例,展示了HorizontalScrollView.onScrollChanged()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HorizontalScrollView.onScrollChanged()
方法的具体详情如下:
包路径:android.widget.HorizontalScrollView
类名称:HorizontalScrollView
方法名:onScrollChanged
暂无
代码示例来源:origin: ogaclejapan/SmartTabLayout
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (onScrollChangeListener != null) {
onScrollChangeListener.onScrollChanged(l, oldl);
}
}
代码示例来源:origin: alibaba/Tangram-Android
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (listener != null) {
listener.onScrollChangedExt(l, t, oldl, oldt);
}
}
代码示例来源:origin: alibaba/Tangram-Android
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (listener != null) {
listener.onScrollChangedExt(l, t, oldl, oldt);
}
}
代码示例来源:origin: ZieIony/Carbon
@Override
protected void onScrollChanged(int x, int y, int prevX, int prevY) {
super.onScrollChanged(x, y, prevX, prevY);
if (drag || leftGlow == null)
return;
final int range = computeHorizontalScrollRange() - getWidth();
boolean canOverscroll = overscrollMode == OVER_SCROLL_ALWAYS ||
(overscrollMode == OVER_SCROLL_IF_CONTENT_SCROLLS && range > 0);
if (canOverscroll) {
int dx = x - prevX;
long t = System.currentTimeMillis();
int velx = (int) (dx * 1000.0f / (t - prevScroll));
if (computeHorizontalScrollOffset() == 0 && dx < 0) {
leftGlow.onAbsorb(-velx);
} else if (computeHorizontalScrollOffset() == range && dx > 0) {
rightGlow.onAbsorb(velx);
}
prevScroll = t;
}
}
代码示例来源:origin: weexteam/weex-hackernews
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mScrollViewListener != null) {
mScrollViewListener.onScrollChanged(this, l, t, oldl, oldt);
}
}
代码示例来源:origin: pili-engineering/PLDroidShortVideo
@Override
protected void onScrollChanged(int x, int y, int oldX, int oldY) {
super.onScrollChanged(x, y, oldX, oldY);
if (Math.abs(oldX - x) > 0) {
if (mScrollingRunnable != null) {
removeCallbacks(mScrollingRunnable);
}
mScrollingRunnable = new Runnable() {
public void run() {
if (mIsScrolling && !mIsTouching) {
if (mOnScrollListener != null) {
mIsDragScroll = false;
}
}
mIsScrolling = false;
mScrollingRunnable = null;
}
};
postDelayed(mScrollingRunnable, 200);
} else {
mIsDragScroll = false;
}
if (mOnScrollListener != null) {
mOnScrollListener.onScrollChanged(this, x, y, oldX, oldY, mIsDragScroll);
}
}
代码示例来源:origin: 80945540/LCRapidDevelop
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (onScrollChangeListener != null) {
onScrollChangeListener.onScrollChanged(l, oldl);
}
}
代码示例来源:origin: com.albedinsky.android/ui-widget-layout
/**
*/
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mScrollChangeListeners != null && !mScrollChangeListeners.isEmpty()) {
for (ViewWidget.OnScrollChangeListener listener : mScrollChangeListeners) {
listener.onScrollChanged(this, l, t, oldl, oldt);
}
}
}
代码示例来源:origin: z3896823/PanelList
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
// 通知自定义的listener
if (listener != null){
listener.onHorizontalScrolled(this, l, t, oldl, oldt);
}
}
代码示例来源:origin: wanliyang1990/NavigationBar
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if(this.onScrollChangedListener != null) {
onScrollChangedListener.onScrollChanged(l, t, oldl, oldt);
}
}
}
代码示例来源:origin: dwfox/DWRulerView
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mOnScrollChangedListener != null) {
mOnScrollChangedListener.onScrollChanged(this, l, t);
}
}
代码示例来源:origin: 80945540/FreeBook
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (onScrollChangeListener != null) {
onScrollChangeListener.onScrollChanged(l, oldl);
}
}
代码示例来源:origin: com.albedinsky.android/ui
/**
*/
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mScrollChangeListeners != null && !mScrollChangeListeners.isEmpty()) {
for (ViewWidget.OnScrollChangeListener listener : mScrollChangeListeners) {
listener.onScrollChanged(this, l, t, oldl, oldt);
}
}
}
代码示例来源:origin: com.albedinsky.android/ui-widget-layout-scroll
/**
*/
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (mScrollChangeListeners != null && !mScrollChangeListeners.isEmpty()) {
for (ViewWidget.OnScrollChangeListener listener : mScrollChangeListeners) {
listener.onScrollChanged(this, l, t, oldl, oldt);
}
}
}
代码示例来源:origin: GitLqr/TopsalesSellControlTableDemo
@Override
protected void onScrollChanged(int x, int y, int oldx, int oldy) {
super.onScrollChanged(x, y, oldx, oldy);
if (scrollViewListener != null) {
scrollViewListener.onScrollChanged(this, x, y, oldx, oldy);
}
}
代码示例来源:origin: TheMelody/LotteryTrend
/**
* ScrollView改变的监听
*/
protected void onScrollChanged(int x, int y, int oldx, int oldy) {
super.onScrollChanged(x, y, oldx, oldy);
//顶部的的scrollView,同步的时候只改变在x轴方向....
mCallback.changeXScroll(x);
}
}
代码示例来源:origin: fengmaolian/AnalyzeRecyclerViewWithBGARefreshLayout
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
Log.i("TAG", "11");
mTextView_Delete.setTranslationX(l - mScrollWidth);
}
/**
代码示例来源:origin: kevalpatel2106/android-ruler-picker
@Override
protected void onScrollChanged(final int horizontalOrigin,
final int verticalOrigin,
final int oldHorizontalOrigin,
final int oldVerticalOrigin) {
super.onScrollChanged(horizontalOrigin, verticalOrigin, oldHorizontalOrigin, oldVerticalOrigin);
if (mScrollChangedListener == null) return;
mScrollChangedListener.onScrollChanged();
if (mLastScrollUpdateMills == -1) postDelayed(mScrollerTask, NEW_CHECK_DURATION);
mLastScrollUpdateMills = System.currentTimeMillis();
}
代码示例来源:origin: FangWW/ComparisonCar
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
//当当前的HListViewScrollView被触摸时,滑动其它
if(null!=this.listener&&null!=listener.getCurrentTouchView()&&listener.getCurrentTouchView() == this) {
listener.onUIScrollChanged(l, t, oldl, oldt);
}else{
super.onScrollChanged(l, t, oldl, oldt);
}
}
代码示例来源:origin: Catrobat/Paintroid
@Override
protected void onScrollChanged(int l, int t, int oldl, int oldt) {
super.onScrollChanged(l, t, oldl, oldt);
if (scrollStateListener != null) {
if (l == 0) {
scrollStateListener.onScrollMostLeft();
} else if (oldl == 0) {
scrollStateListener.onScrollFromMostLeft();
}
int mostRightL = this.getChildAt(0).getWidth() - getWidth();
if (l >= mostRightL) {
scrollStateListener.onScrollMostRight();
} else if (oldl >= mostRightL && l < mostRightL) {
scrollStateListener.onScrollFromMostRight();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!