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

 

posted @ 2019-02-23 16:55  陈松(Andy)  阅读(1206)  评论(0编辑  收藏  举报