I have created a android application where I have created a popup screen. But when I am pressing the back button, popup is not getting closed.
I have tried with onB
popup.setBackgroundDrawable(new BitmapDrawable()); popup.setOnDismissListener(new PopupWindow.OnDismissListener() { @Override public void onDismiss() { //do your code here } });