Thursday, September 29, 2011

How to remove focus and hide the on screen Keyboard?

How to remove focus and hide the on screen Keyboard.
EditTest on focus changed key board will hide. 
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editTextField.getWindowToken(), 0);
or onclick button key board hide... 
 btnSend.setOnClickListener(new OnClickListener() 
        {
            public void onClick(View v) 
            {
            
             //***Key Board Hide****//
             InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
             imm.hideSoftInputFromWindow(mOutEditText.getWindowToken(), 0);
               
              }});

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...