Handler的postDelayed(Runnable, long)
作者:互联网
handler.postDelayed(myRunnable,1000)是为了轮播图片,每隔1000ms后执行一次run方法,实现轮播
实例如下:
public void MesageColse(){ Runnable runnable=newRunnable(){ @Override public void run(){ message_show.setText(""); } }; Handler myHandler=newHandler(); myHandler.postDelayed(runnable,3000); }
标签:Runnable,run,void,long,Handler,postDelayed,public,runnable 来源: https://www.cnblogs.com/xmyjcs/p/10423244.html