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);
}

 

你可能感兴趣的:(Handler的postDelayed(Runnable, long))