prostock
prostock

Reputation: 9535

Dismissing an Android popupwindow

I use a popupwindow in my activity that i would like to dimiss, but i see the following documentation about the dimiss() method for popup windows:

public void dismiss () Since: API Level 1

Dispose of the popup window. This method can be invoked only after showAsDropDown(android.view.View) has been executed. Failing that, calling this method will have no effect. See Also

* showAsDropDown(android.view.View)

If I don't want to show the popup with showAsDropDown how else can u remove it from the main view?

Upvotes: 0

Views: 603

Answers (1)

Romain Guy
Romain Guy

Reputation: 98501

dismiss() will work as long as the PopupWindow is shown on screen.

Upvotes: 2

Related Questions