0

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.

4

1 回答 1

1

在您onCreate的活动中,您需要添加以下内容:

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
于 2013-05-10T12:50:48.987 回答