경고 대화 상자가 표시 될 때 키보드가 강제로 표시되도록하려면 다음 코드를 사용해야합니다.AlertDialog에서 소프트 키보드 강제 실행
public void showTypeBox(){
edit = new EditText(this);
edit.setPadding(10, 0, 0, 10);
AlertDialog dialog = new AlertDialog.Builder(this)
.setTitle("Type word to search for:")
.setPositiveButton("Search", Main.this)
.setNegativeButton("Cancel", null)
.setView(edit)
.setIcon(R.drawable.menu_icon)
.create();
dialog.show();
InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.showSoftInput(edit, InputMethodManager.SHOW_IMPLICIT);
}
내가 여기서 잘못하고있는 것을 볼 수 없습니다.
텍스트 상자에서 키보드를 표시하고 싶습니까? –