Ale*_*lex 6 android horizontal-scrolling horizontalscrollview
我有一个horizontalScrollView,我需要在加载视图时自动滚动以动画结束.我已经实现了这个方法:
final HorizontalScrollView strip = (HorizontalScrollView) contentView.
findViewById(R.id.horizontalScrollView1);
strip.postDelayed(new Runnable() {
public void run() {
strip.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
}
}, 1000L);
Run Code Online (Sandbox Code Playgroud)
它运行正常,但是,主要问题是滚动的动画太快,我需要实现较慢的滚动.你知道吗?
这是我为我的一个项目创建的演示项目.它是一个自动连续滚动的滚动条.通过不断滚动图像列表来显示信用屏幕.这可能会帮助您或给您一些想法.
https://github.com/blessenm/SlideshowDemo
尝试这个:
ObjectAnimator animator=ObjectAnimator.ofInt(buttonHolderScrollView, "scrollX",targetXScroll );
animator.setStartDelay(100);
animator.setDuration(100);
animator.start();
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9807 次 |
| 最近记录: |