我正在RecyclerView
适配器中使用弹出窗口,这是初始化popupWindow的代码。
LayoutInflater inflater = (LayoutInflater) mActivity
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
if (inflater != null) {
View customView = inflater.inflate(R.layout.popup_box, null);
pw = new PopupWindow(customView, LinearLayout.LayoutParams.WRAP_CONTENT,
LinearLayout.LayoutParams.WRAP_CONTENT, true);
// display the popup in the center
pw.setOutsideTouchable(true);
pw.showAtLocation(parentView, Gravity.CENTER, 0, 0);
}
根据文档,当我们在窗口外部触摸时,触摸会传递到后面的窗口,但是它不起作用,为什么这不起作用?谢谢