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
What you need to do is call setBackgroundDrawable on your PopupWindow after you initialize it. Something like:
myPopup.setBackgroundDrawable(new BitmapDrawable());