//create layoutinflator try {
LayoutInflater inflator = LayoutInflater.from(this);
//create view
fi
Try this:
pw.setTouchable(true);
pw.setFocusable(false);
pw.setOutsideTouchable(false);
When window touchable is true
, focusable is false
, setOutsideTouchable()
works.
If setOutsideTouchable(true)
, touch outside of popupwindow will dismiss, otherwise the outside of popupwindows still can be touchable without dismiss.