下面三个条件必须要有,要在popupWindow显示之前调用popupWindow.setOutsideTouchable(true);popupWindow.setFocusable(true);popupWindow.setBackgroundDrawable(new BitmapDrawable());