How to stop Soft keyboard showing automatically when focus is changed (OnStart event)

前端 未结 4 1543
有刺的猬
有刺的猬 2020-12-11 00:11

I am developing for a tablet using Android 2.2.

I have a form which I am using for new and editable instances. When editable, I want to stop the user from editing c

4条回答
  •  孤街浪徒
    2020-12-11 00:48

    Maybe this will help you:

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

    Put this method in the onCreate() method of your activity when the activity is first created or called.

提交回复
热议问题