开发者

Hide/Show custom dialog in Android

I have a custom dialog which is non-modal. In my screen i have custom dialog and few other UI elements. user taps on开发者_运维知识库 the dialog and it is shown. Now i want to handle a scenario where if he/she clicks anywhere on other UI elements i want to hide the dialog.

Is it possible ?


Add a listener to the UI element and use this when a user clicks it.

public final void dismissDialog (int id)

Since: API Level 1 Dismiss a dialog that was previously shown via showDialog(int). Parameters

id The id of the managed dialog.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜