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
The popup window normally closes when you press the back button. if you need to handle certain things when the popup closes, you can use
popupWindow.setOnDismissListener
Note:- I worked in kotlin. It worked for me