I'm developping an android app , and i have an EditText
and a two RadioButtons
(A and B ),
what i'm trying to do is :
When RadioButton
A is checked , i want to change the keyboard layout to display it with the Done button ,
When the RadioButton
B is checked, i want to change the keyboard layout to display it with the Search Button .
I've tried to change the IMEOptions
of my EditText
like this , but it still doesn't work :
NB : the keyboard is already visible, what i want to do is just modify the button Search with the button Done in each case of the two radioButtons
@Override
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
if(btnA.isChecked() ) {
txtSearch.setImeOptions(EditorInfo.IME_ACTION_DONE);
// txtSearch.invalidate();
}
else {
txtSearch.setImeOptions(EditorInfo.IME_ACTION_SEARCH);
// txtSearch.invalidate();
}
}
any ideas about how to do that ??
Thanks in advance.