i have custom listview
with editText
and edit the edittext
data on tapping edittext
with help of showing keypad it is working fine .
my problem is when i click outside of edittext
the keypad must hide.
thanks...
For this you have to take the onTouchListener on the parent layout of the Layout File. on the TouchListener you have to code to hide the Keyboard when click outside the EditText. Please follow XML Layout and Java class to resolve this issue please follow following url.
http://amitthaperandroidquery.blogspot.com/2011/10/remove-keyboard-after-click-outside.html
One way is that you can set a focus change listener to the EditText. When the widget loses focus you can hide the Keyborad by:-
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(myEditText.getWindowToken(), 0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With