سؤال

I am UI and in that in edittext I type and then click button. The softkeyboard stays popped up. Actually before clicking button I want to hide keyboard. How to do it ?

Regards,

miten.

هل كانت مفيدة؟

المحلول 2

InputMethodManager imm = (InputMethodManager)getSystemService(Service.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(findViewById(R.id.value).getWindowToken(), 0);

نصائح أخرى

KEYCODE_BACK works for the phones I use (not emulators).

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top