dear friends,
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.
dear friends,
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.
See this question from a couple of days ago:
http://stackoverflow.com/questions/2568637/how-to-disable-next-button-on-a-edittext-software-keyboard-replace-with-done
If your question is that you have an EditText or editable TextView, and you want the action right button on the softkeyboard to read "Go" then add this attribute to your EditText/TextView
android:imeActionLabel="actionGo"
note that it will also have to be a single line TextView as otherwise the action button will be a carriage return selector (an arrow).
android:singleLine="true"
finally i used...
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;
}
});