Vertically AutoScrolling Textview

后端 未结 1 833
独厮守ぢ
独厮守ぢ 2021-01-15 13:46

I\'m just looking to setup a simple TextView wrapped in a ScrollView which will automatically scroll down displaying the contents of the TextView in the same way as movies h

相关标签:
1条回答
  • 2021-01-15 13:59

    This is the way I am doing it in a horizontal scroll. It is set on 2 seconds and scrolls the view every 20 miliseconds

        public void scrollRight(final HorizontalScrollView h){
    new CountDownTimer(2000, 20) { 
    
        public void onTick(long millisUntilFinished) { 
            h.scrollTo((int) (2000 - millisUntilFinished), 0); 
        } 
    
        public void onFinish() { 
    
        } 
     }.start(); }
    

    h is my HorizontalScrollView

    0 讨论(0)
提交回复
热议问题