调用:
popupwindow_right = buildPopupWindow(v,
R.layout.friend_circle_notify_popup); //加载自定义的布局
popupwindow_right.findViewById(R.id.friend).setOnClickListener(this); 按钮监听
定义弹出框位置和大小(无暗色背景)
布局设定,自适应自己的大小
//window = new PopupWindow(ac);
window = new PopupWindow(v, LayoutParams.FILL_PARENT,LayoutParams.FILL_PARENT, true);
DisplayMetrics outMetrics = new DisplayMetrics();
this.getWindowManager().getDefaultDisplay()
.getMetrics(outMetrics);
window.setWidth(WindowManager.LayoutParams.MATCH_PARENT);
window.setHeight(WindowManager.LayoutParams.MATC