Question

I am developing an android application that has a requirement to AUTOMATICALLY ANIMATE the vertical scrolling of text displayed within a multi line TextView. My requirement is that the Activity first displays the Text within my TextView, then following a brief pause (e.g. 1 - 2 Seconds) the Text starts to scroll vertically WITH NO USER INTERVENTION WHATSOEVER. Is my only option to call "public void scrollBy (int x, int y)" within a background thread?

Était-ce utile?

La solution

try this code in onStart() method

    Handler handler = new Handler();
    handler.postDelayed(new Runnable() {

        @Override
        public void run() {
            // TODO Auto-generated method stub
        // here put editext scroll code and i have set 5 seconds 
        }
    }, 5000);
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top