9

問題は、fullScroll()scrollTo()関数を使用してスクロールしていることですが、アニメーション化されており、ユーザーの観察なしで発生する必要があります。

この問題を解決する方法はありますか?

hScrollView.post(new Runnable() {
    @Override
    public void run() {
        hScrollView.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
    }
});
4

2 に答える 2

6

これを使って

// Disable the animation First
hScrollView.setSmoothScrollingEnabled(false);
// Now scroll the view
hScrollView.fullScroll(HorizontalScrollView.FOCUS_RIGHT);
// Now enable the animation again if needed
hScrollView.setSmoothScrollingEnabled(true);
于 2015-01-18T17:58:18.820 に答える