开发者

Android hide an AlertDialog.Builder(mycontext)

开发者 https://www.devze.com 2023-02-18 22:20 出处:网络
How can I do this? There isnt any .hide() on this, only .show()? I need to hide an alertdialog.builder after 7 seconds

How can I do this? There isnt any .hide() on this, only .show()?

I need to hide an alertdialog.builder after 7 seconds

                final Timer timer=new Timer();
                timer.schedule(new TimerTask() {
                    @Override  public void run() {  
  开发者_开发知识库                      ad.hide(); //<- this isnt good
                        timer.cancel();
                    }
                }, 7000, 0);


Lacas,

I believe you intend to call dismiss() on the Dialog?


write AlertDialog.hide(); to hide the AlertDialog Box

0

精彩评论

暂无评论...
验证码 换一张
取 消