Unable to hide the virtual keyboard of SearchView iconfiedbydefault(false)

前端 未结 7 2047
轮回少年
轮回少年 2021-01-18 21:11

I have a search view which is set as expanded by default with default search query but i don\'t want the virtual keyboard.In below code i tried to hide keyboard in o

7条回答
  •  孤街浪徒
    2021-01-18 22:13

    try

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

提交回复
热议问题