Android development EditView development record

Focus automatically selected, and the pop-up input box

EditText.setFocusable(true);
EditText.setFocusableInTouchMode(true);
EditText.requestFocus();
InputMethodManager inputManager = (InputMethodManager) viewHolder.commentEditText.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
inputManager.showSoftInput(EditText, 0);

The input position change, changing the position of the input box

android: windowSoftInputMode value adjustPan or adjustResize can, like this:

<activity
    android:name=".MainActivity"
    android:windowSoftInputMode="adjustPan"  >
    ...
</activity>

Into the activity would have to display the input method

Join an activity in Android manifest file corresponding configuration: windowSoftInputMode = "stateVisible | adjustResize"

Guess you like

Origin www.cnblogs.com/guanxinjing/p/11069907.html