android edittext 获取焦点并弹出软键盘

editText.setFocusable(true);
        editText.setFocusableInTouchMode(true);
        editText.requestFocus();
        activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);

 

posted @ 2018-03-26 15:43  贺长寿  阅读(3875)  评论(0)    收藏  举报