代码实现自己的actionSearch

imeOptions="actionSearch"

EditText   SearchEditText =(EditText)findViewById(R.id.txtMapSearch); 
         SearchEditText.setOnEditorActionListener(new OnEditorActionListener(){  
 
 
 
            @Override 
            public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) { 
                // TODO Auto-generated method stub 
                 if(arg1 == EditorInfo.IME_ACTION_SEARCH)  
                 { 
 
                  // search pressed and perform your functionality.                    
                 } 
                 return false; 
            } 
 
         }); 

 

你可能感兴趣的:(action)