2013年9月22日星期日

[Android] Ask : AlterDialog Can code to close it ?

Such as a pop-up AlterDialog, 10 seconds, there is no point "OK " or " Cancel" button , it automatically closes it , to achieve it ?
------ Solution ---------------------------------------- ----
set a Timer, the time is called the Dialog dismiss () or cancel () method . These two methods essentially the same , except that the cancel () will be called DialogInterface.OnCancelListener ( if you sign up for it ) .
------ Solution ---------------------------------------- ----
easily set a timer to determine when the Dialog! = null && Dailog.isShowing () then Dailog.dismiss ()
---- - eference ---------------------------------------
Thank tantahe and lieri111, I tested it to see

没有评论:

发表评论