方式1
- 4.x上这种实例方式才可以正常显示出来
View view = View.inflate(mContext, R.layout.layout_my_album_item_pop, null);
final PopupWindow popupWindow = new PopupWindow(view, ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
popupWindow.setOutsideTouchable(true);
popupWindow.setTouchable(true);
方式2
在4.x上显示不出来
final PopupWindow popupWindow = new PopupWindow(mContext);
View view = View.inflate(mContext, R.layout.layout_my_album_item_pop, null);
popupWindow.setContentView(view);
popupWindow.setBackgroundDrawable(new BitmapDrawable());
popupWindow.setOutsideTouchable(true);
popupWindow.setTouchable(true);