自定义定时器 自动关闭弹出框

 //自定义定时器 15秒后退出程序弹出框自动关闭
         final Timer t = new Timer();
         t.schedule(new TimerTask(){
                    @Override
                    public void run() {
                             // TODO Auto-generated method stub
                              alertDialogLogin.dismiss();
                               t.cancel();
                      }         
         }, 15000);

你可能感兴趣的:(Android)