Advertisement

对话框不能隐藏软键盘

阅读量:

Dialog 无法隐藏软键盘

  • Dialog 无法将软键盘进行隐藏

Dialog 无法隐藏软键盘

自行开发了一个inputdialog工具类

然而在弹出软键盘之后,点击取消、确定或对话框外部区域时,软键盘无法同步关闭

复制代码
     Dialog inputDialog = new Dialog(context);
    inputDialog.show();
    LayoutInflater inflater = LayoutInflater.from(context);
    View view = inflater.inflate(R.layout.pdms_dialog_input, null);
    inputDialog.getWindow().setContentView(view);
    TextView negative = view.findViewById(R.id.btn_selectNegative);
    TextView positive = view.findViewById(R.id.btn_selectPositive);
    TextView titleText = view.findViewById(R.id.txt_dialog_title);
    ClearEditText

全部评论 (0)

还没有任何评论哟~