I have a PopupWindow and I wanted it to dismiss when the user touches outside, so I looked into and found out that I had to use popup.setBackgroundDrawable(new BitmapDrawa
popup.setBackgroundDrawable(new BitmapDrawa
What I had to do to get it to work:
popup.setBackgroundDrawable(new ColorDrawable(ContextCompat.getColor(context, android.R.color.transparent))); popup.setOutsideTouchable(true);