作者:眼睛Blank | 来源:互联网 | 2023-08-11 08:52
本文整理了Java中android.widget.OverScroller.forceFinished()
方法的一些代码示例,展示了OverScroller.forceFinished()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。OverScroller.forceFinished()
方法的具体详情如下:
包路径:android.widget.OverScroller
类名称:OverScroller
方法名:forceFinished
暂无
代码示例
代码示例来源:origin: chrisbanes/PhotoView
public void cancelFling() {
mScroller.forceFinished(true);
}
代码示例来源:origin: jiangqqlmj/FastDev4Android
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
代码示例来源:origin: wangdan/AisenWeiBo
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
代码示例来源:origin: MikeOrtiz/TouchImageView
void forceFinished(boolean finished) {
overScroller.forceFinished(finished);
}
代码示例来源:origin: alexvasilkov/GestureViews
@SuppressWarnings("WeakerAccess") // Public API
public void stopFlingAnimation() {
if (isAnimatingFling()) {
flingScroller.forceFinished(true);
onFlingAnimationFinished(true);
}
}
代码示例来源:origin: liaoinstan/SpringView
private void doMove() {
if (!mScroller.isFinished()) mScroller.forceFinished(true);
//根据下拉高度计算位移距离,(越拉越慢)
int movedy;
if (dy > 0) {
movedy = (int) (((MAX_HEADER_PULL_HEIGHT + getScrollY()) / (float) MAX_HEADER_PULL_HEIGHT) * dy / MOVE_PARA);
} else {
movedy = (int) (((MAX_FOOTER_PULL_HEIGHT - getScrollY()) / (float) MAX_FOOTER_PULL_HEIGHT) * dy / MOVE_PARA);
}
scrollBy(0, -movedy);
callOnScrollAndDrag();
}
代码示例来源:origin: robolectric/robolectric
@Test
public void forceFinishedShouldFinishWithoutMovingFurther() {
overScroller.startScroll(0, 0, 100, 200, 1000);
ShadowLooper.idleMainLooper(500);
overScroller.forceFinished(true);
assertThat(overScroller.getCurrX()).isEqualTo(50);
assertThat(overScroller.getCurrY()).isEqualTo(100);
assertThat(overScroller.timePassed()).isEqualTo(500);
assertThat(overScroller.isFinished()).isTrue();
}
}
代码示例来源:origin: multidots/android-app-common-tasks
public void forceFinished(@SuppressWarnings("SameParameterValue") boolean finished) {
if (isPreGingerbread) {
scroller.forceFinished(finished);
} else {
overScroller.forceFinished(finished);
}
}
代码示例来源:origin: multidots/android-app-common-tasks
public void forceFinished(@SuppressWarnings("SameParameterValue") boolean finished) {
if (isPreGingerbread) {
scroller.forceFinished(finished);
} else {
overScroller.forceFinished(finished);
}
}
代码示例来源:origin: doggycoder/AndroidOpenGLDemo
scrollY=scrollY-dy;
mScroller.forceFinished(true);
invalidate();
int nowChecked;
代码示例来源:origin: albinmathew/PhotoCrop
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
代码示例来源:origin: SuperKotlin/PictureViewer
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
代码示例来源:origin: oginotihiro/cropview
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
代码示例来源:origin: easemob/kefu-android-demo
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
代码示例来源:origin: easemob/livestream_demo_android
@Override
public void forceFinished(boolean finished) {
mScroller.forceFinished(finished);
}
代码示例来源:origin: donglua/JZAndroidChart
@Override
public boolean onDown(MotionEvent e) {
releaseEdgeEffects();
mScrollerStartViewport.set(mCurrentViewport);
mScroller.forceFinished(true);
postInvalidateOnAnimation();
return true;
}
代码示例来源:origin: HotBitmapGG/MoeQuest
public void forceFinished(boolean finished) {
if (isPreGingerbread) {
scroller.forceFinished(finished);
} else {
overScroller.forceFinished(finished);
}
}
代码示例来源:origin: guojunustb/sample-of-Android-week-view
@Override
public boolean onDown(MotionEvent e) {
mScroller.forceFinished(true);
mStickyScroller.forceFinished(true);
return true;
}
代码示例来源:origin: JakePrim/PrimFilePicker
public void forceFinished(boolean finished) {
if (isPreGingerbread) {
scroller.forceFinished(finished);
} else {
overScroller.forceFinished(finished);
}
}
代码示例来源:origin: fujianlian/KLineChart
@Override
public void computeScroll() {
if (mScroller.computeScrollOffset()) {
if (!isTouch()) {
scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
} else {
mScroller.forceFinished(true);
}
}
}