Dismiss PopupWindow on touch outside popup, without using deprecated constructor

前端 未结 3 717
遇见更好的自我
遇见更好的自我 2021-02-13 04:55

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

3条回答
  •  故里飘歌
    2021-02-13 05:19

    You could try.

    popup.setBackgroundDrawable(new BitmapDrawable(getResources(),
                ""));
    

提交回复
热议问题