//Java代码private void showPopupWindow(View view) { // 一个自定义的布局,作为显示的内容 View contentView = LayoutInflater.from(getActivity()).inflate( R.layout.layout_popwindow1, null); final PopupWindow popupWindow = new PopupWindow(contentView, ViewGroup.LayoutParam…