滚动了滚动型缓慢 [英] Scroll up a ScrollView slowly

查看:201
本文介绍了滚动了滚动型缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在的问题是我如何滚动了滚动型顶部非常顺利,慢慢来。

The question is "How do i scroll up a ScrollView to top very smoothly and slowly".

在我的特殊情况下,我需要滚动到顶部约1-2秒。 香港专业教育学院尝试手动使用插值处理程序(调用scrollTo(0,Y)),但没有工作的。

In my special case i need to scroll to top in about 1-2 seconds. Ive tried interpolating manually using a Handler (calling scrollTo(0, y)) but that didnt work at all.

我已经看到了一些bookreader-app的这种影响还,所以必须有一个办法,我敢肯定:D。 (文字很缓慢滚动起来去阅读无需触摸屏幕,做输入)。

I've seen this effect on some bookreader-apps yet, so there must be a way, im sure :D. (Text is very slowly scrolling up to go on reading without touching the screen, doing input).

推荐答案

在2秒内移动滚动视图到2000年的possition

In 2 seconds move the scroll view to the possition of 2000

new CountDownTimer(2000, 20) {          

 public void onTick(long millisUntilFinished) {             

   scrolView.scrollTo((0, (int) 2000 - millisUntilFinished));         
 }          

 public void onFinish() {  
 }      

}.start(); 

这篇关于滚动了滚动型缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆