解决方案: showAtLocation调用之前popupWindow.setOutsideTouchable(true); 千万不要加错位置,否则在popWindow界面外面点击,也不消失。关键时刻要找准自己的位置。c位很重要