UMAR-MOBITSOLUTIONS UMAR-MOBITSOLUTIONS - 1 month ago 8
Android Question

how to add Go button in android SoftKeyBoard and its functionality?

i want to put "Go" button in android appliation softkeyboard

for search and other related scenarios can any one guide me how to achieve this? with example.

any help would be appriciated.

Answer

finally i used...

EditText SearchEditText =(EditText)findViewById(R.id.txtMapSearch); 
SearchEditText.setOnEditorActionListener(new OnEditorActionListener(){  

    @Override 
    public boolean onEditorAction(TextView arg0, int arg1, KeyEvent arg2) { 
        if(arg1 == EditorInfo.IME_ACTION_SEARCH)  
        { 
            // search pressed and perform your functionality.
        }
        return false; 
    } 

});