-1

I have searched on this. However not a single solution worked.

PopupWindow is set, the only thing I would love to happen is when I click outside the popup it should get dismiss or cancel.

pSamrat
  • 1
  • 2

3 Answers3

2

try

progressDialog.setCanceledOnTouchOutside(true);
Piyush
  • 18,895
  • 5
  • 32
  • 63
Chamu
  • 194
  • 5
0

You should add this function with pop up setOutsideTouchable call's parameter to true:

pw = new PopupWindow(getApplicationContext());
pw.setOutsideTouchable(true);

hopefully it will serve your purpose

Piyush
  • 18,895
  • 5
  • 32
  • 63
Irshad Khan
  • 794
  • 6
  • 21
0
popupWindow.setOutsideTouchable(true);
popupWindow.setBackgroundDrawable(getResources().getDrawable(R.id.something));
Abhishek
  • 39
  • 6