in my app i am having an edit text box. When the user clicks the edit box i want to show him a alert box at that time i dont want the keyboard to be popped up. For this my code is as follows
bd =(EditText)findViewById(R.id.dob);
bd.setHint("Birth Date");
bd.setOnClickListener(bdListener); 
private OnClickListener bdListener = new View.OnClickListener()
 {
     public void onClick(View v) 
     {
      hidesoftkeyboard();
      DOBalert();
     }
 }
private void hidesoftkeyboard()
  {
    InputMethodManager imm = InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromInputMethod(bd.getWindowToken(), 0);
  }
But still the keyboard is not hiding, where i am going wrong please help me friends
 
     
     
    