@Override
  public boolean onKeyDown(int keyCode, KeyEvent event) {

    if (keyCode == KeyEvent.KEYCODE_BACK) {
      dismiss();
    }
    return super.onKeyDown(keyCode, event);
  }
 @Override
 public boolean handleMessage(Message msg) {
   if (onHideListener != null) {
     onHideListener.onHide();
   }
   dismiss();
   return false;
 }