title: How to disable back button in activity for dialog
body: <p>I have a problem that I want to handle back button event in a PopUpWindow(Dialog box) instead of a activity. I implemented OnKeyListner,... but it is not working</p>
  
  <p>Here is my PopUpWindow</p>
  
  <pre><code>public class PopUp extends PopupWindow implements OnKeyListener{
  ...
  @Override
    public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
      // TODO Auto-generated method stub
      return false;
  }
  </code></pre>