I have autocomplete edit text i want that show soft input keyboard even on focus or not on autocomplete. I tried so manny things but non of them is working. Like in Manifest :
<activity android:name=".MainActivity"
android:windowSoftInputMode="stateAlwaysVisible"
></activity>
In Activity :
number = (AutoCompleteTextView) findViewById(R.id.ed_number);
number.requestFocus();
InputMethodManager imms = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imms.showSoftInput(number, InputMethodManager.SHOW_FORCED);
if (!number.hasFocus()) {
imm.showSoftInput(number, 0);
number.requestFocus();
}
// on layout click it flickering on click like show/hide
linear_layout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
InputMethodManager immq = (InputMethodManager) view.getContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
immq.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.SHOW_FORCED);
}
});