我想让Dialog和PopupWindow弹出来之后标题的一些键任然有效,弄了两天了还是不行
如果PopupWindow.setfocusable(flase)那么Edidtext就不能编辑了。
这是Popupwindow的代码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);
如果PopupWindow.setfocusable(flase)那么Edidtext就不能编辑了。
这是Popupwindow的代码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);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货