80,362
社区成员
发帖
与我相关
我的任务
分享
View contentView = LayoutInflater.from(Longtimework_Activity.this).inflate(R.layout.nowbook_popwindow_item,null);
mPopWindow = new PopupWindow(contentView,
ViewGroup.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.WRAP_CONTENT, true);
mPopWindow.setContentView(contentView);
mPopWindow.setWidth(ViewGroup.LayoutParams.MATCH_PARENT);
mPopWindow.setHeight(ViewGroup.LayoutParams.WRAP_CONTENT);
mPopWindow.setBackgroundDrawable(new BitmapDrawable());
mPopWindow.setTouchable(true);
mPopWindow.setFocusable(true);
mPopWindow.setOutsideTouchable(true);
View rootview = LayoutInflater.from(Longtimework_Activity.this).inflate(R.layout.activity_longtimework_, null);
mPopWindow.showAtLocation(rootview, Gravity.BOTTOM, 0, 0);