I created a popupwindow to show a menu. I found that if I press the cancel button on keyboard, the popupwindow will dismiss, and setFocusable() only disable the buttons like menu, but cancel button still works. If there exists a method to make popupwindow invalid for popupwindow, or define the action myself when a cancel button is pressed? Thanks.
Well I mean back button when i say cancel button. And Thanks for sachy and other people who reply me.