如何让标题不被Dialog,或者PopupWindows覆盖仍然在同一界面显示

s_s_v 2017-11-04 09:12:25
我想让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);

...全文
492 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
moonFY 2017-11-06
  • 打赏
  • 举报
回复
那 toolbar 下面的布局 写上2个 ,第一个就是普通页面, 另一个写 你要弹出的 dialog 的布局,加层阴影,
jklwan 2017-11-06
  • 打赏
  • 举报
回复
那就不要用这两个,写个布局放到上面,使用显示和隐藏切换。

80,362

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧