我已经使用了滚动条自动滚动,但它仍然保持滚动,即使当文本得到了。我想找到位置,并希望停止自动滚动,所以thta文本会到达它的初始位置,就像在文本滚动文本时一样。我该怎么做?用于自动筛选的代码是:public void Scroll(){ //text = (TextView) findViewById(R.id.TxtView); length = text.getLineCount(); scroll.computeScrollOffset(); text.setScroller(scroll); int a = text.getBottom(); int b = text.getTop(); //scroll.extendDuration(scroll.getFinalY()); scroll.startScroll(scroll_x, scroll_y, 0, a, (500000)/ speedAmount);} 最佳答案 尼基您需要检查源代码here。同样,文本必须是其首字母位置用于此用途scrollTo(0, 0);我想找到那个职位使用希望停止自动滚动使用&你完了!:)编辑:nikki,我写了一个派生自scroll.getCurrX();的类来定制一个textview,在这个视图中,文本可以滚动到文本完成并在文本完成后返回到初始位置。您需要做的只是创建一个自定义类,如下面所定义的here并覆盖scroll.abortAnimation();。public void computeScroll() {super.computeScroll();if (null == mSlr) return;if (mSlr.isFinished() && (!mPaused)) {scrollTo(0, 0);//scroll to initial position or whatever position you want it to scroll}}关于android - 如何在自动浏览的textview中实现滚动条?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/4285528/