Hiding keyboard after calling new Activity that shows a ProgressDialog

后端 未结 5 1410
误落风尘
误落风尘 2021-02-06 11:43

I\'m having trouble with the on screen keyboard. I have an activity with an EditText which shows the keyboard, and a button to go to a second activity. The second a

5条回答
  •  失恋的感觉
    2021-02-06 12:18

    If In Fragment Class

    @Override
        public void onResume()
        {
            getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
            super.onResume();
            }
    

    If In Activity Class

     @Override
        public void onResume()
        {
            this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
            super.onResume();
            FetchLocation fl = new FetchLocation(mContext, locationResult);
        }
    

提交回复
热议问题