Thursday, January 27, 2011

Disabling Search Button

To disable the search button you can use following code that will help you if you want to get more then mail me at onlineandroiddeveloper@gmail.com


final AlertDialog.Builder Main_Dialog = new AlertDialog.Builder(this);
    
     Main_Dialog.setOnKeyListener(new OnKeyListener() {
    
     @Override
     public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
     switch (keyCode) {
                case KeyEvent.KEYCODE_SEARCH:
                        Log.e("Search", "Search");
                        return true;          
     }
     return false;
     }
     });

No comments:

Post a Comment