job.answiz.com
  • 1
Votes
name
name Punditsdkoslkdosdkoskdo

Prevent the keyboard from displaying on activity start

I have an activity with an Edit Text input. When the activity is initialized, the Android keyboard is shown. How can the keyboard remain hidden until the user focuses the input?

 

I think the following may work

getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

I've used it for this sort of thing before.

  • 0
Reply Report