How can I update the editor action button display on the fly? How can I update the editor action button display on the fly? android android

How can I update the editor action button display on the fly?


Please try to be more specific when you describe what do you want to do ... I needed to read your post many times to be able to understand your request ..

So what you want to do is how to react to any key pressed on keyboard and show info about it in action key on keyboard.If that is not your target plz to explain more...

If yes, so I guess you would need to use additionaL EditText ( not visible ) lets call et0. after finishing inserting a letter or any pattern you define through ontextchanged in your edit text, change the focus to et0.. so you can change the actionKey.. and then send the focus back to your editText .. so you can thread or timertask, or any way to manage this temporary changing of focus into and from et0 ..here its not necessary to restart the input.

hope that will help you ..


Have you tried changing /system/usr/keychars/default.kcm on-the-fly before invoking your redraw code? (filename might be different depending on version of Android).

There, you are allowed to set not only key output characters, but also key display values. I haven't tried it, it might also incur a delay, but it's worth a try.


This should be very useful for you.

EditText in = new EditText(this); in.addTextChangedListener(new TextWatcher() {     public void onTextChanged(CharSequence cs, int s, int b, int c) {         Log.i("Key:", cs.toString());     }    public void afterTextChanged(Editable editable) {}     public void beforeTextChanged(CharSequence cs, int i, int j, int k) {} });