Popupwindow里用EditText获取焦点弹出软键盘的问题

来源:互联网 发布:淘宝店家联系方式 编辑:程序博客网 时间:2024/05/21 08:44
点击edittext弹出软键盘点击屏幕其他地方软键盘消失
popView = LayoutInflater.from(context).inflate(R.layout.comment_layout, null);popupWindow = new PopupWindow(popView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);popupWindow.setBackgroundDrawable(context.getResources().getDrawable(R.color.transparent));popupWindow.setOutsideTouchable(true);popupWindow.setFocusable(true);popupWindow.setSoftInputMode(PopupWindow.INPUT_METHOD_NEEDED);popupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);popupWindow.showAtLocation(view, Gravity.BOTTOM | Gravity.LEFT, 0, 0);editComment = ((EditText) popView.findViewById(R.id.edit_comment));editComment.setFocusable(true);
0 0
原创粉丝点击