I am a new user and have a question how to auto roll activity with random countdown time ?
example : ActivityScreen1 display time in 50s-60s -> ActivityScreen2 display time in 30s-40s -> ActivityScreen2 display time in 50s-60s.
Still I want you to learn Android first from some good tutorials. But I can guide you how you can achieve this.
postDelayed()
method. Like this
final Runnable r = new Runnable() {
public void run() {
changeActivity(); // make this method & add your logic of checking current activity & setting new
}
};
handler.postDelayed(r, 1000); // 1000 is millisecond, you will set time here.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.