How to run a Runnable thread in Android at defined intervals?

后端 未结 11 1963
青春惊慌失措
青春惊慌失措 2020-11-22 02:50

I developed an application to display some text at defined intervals in the Android emulator screen. I am using the Handler class. Here is a snippet from my cod

11条回答
  •  你的背包
    2020-11-22 03:17

    new Handler().postDelayed(new Runnable() {
        public void run() {
            // do something...              
        }
    }, 100);
    

提交回复
热议问题