I want to Dismiss the popup window by clicking outside of the popup window or by the back button, but when click on the back button my application exit\'s, instead of exitin
Try this..
Use PopupWindow popupWindow as Global variable
PopupWindow popupWindow
use popup.setOutsideTouchable(true);
popup.setOutsideTouchable(true);
@Override public void onBackPressed() { if (popupWindow != null) { if (popupWindow.isShowing()) { popupWindow.dismiss(); } } else { finish(); } }