View view = inflater.inflate(R.layout.popwindowdemo, null);
final PopupWindow pop = new PopupWindow(view, 600, 800);
pop.setBackgroundDrawable(new BitmapDrawable());
pop.setFocusable(true);// 如果不加這個,Grid不會響應ItemClick
pop.showAtLocation(layout, Gravity.CENTER, 0, 0);
這裏我提一點,點擊外部消失關鍵性一步是pop.setBackgroundDrawable(new BitmapDrawable());
我之前把這句話寫在pop.showAtLocation()之後;也無法顯示