Reputation: 2038
I'm going crazy!!! Please help me. Ths is the problem:
If i have an Activity with an EditText
and a ListView
the Soft Keyboard is shown when the Activity comes visible.
If i have remove the ListView
the Soft Keyboard is no more shown.
I want to perform the first situation (Activity with an EditText
and a ListView
) with the second behavior (Soft Keyboard hidden).
I have try to hide the Soft Keyboard in onResume()
as described in this but it not works.
Please suggest me a workaround to hide the Soft Keyboard. Thank you so much.
P.s. Sorry for my English ;) Hope the problem is clear.
Upvotes: 0
Views: 615
Reputation: 8747
In your onCreate
of your activity you will want to add the following:
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Upvotes: 1