I have this problem where I want to insert a character into a edittext
window where the cursor is by pressing a button outside of the
softkeyboard.
I am using this code in the onClick method:
int mCursorS = mEditText.getSelectionStart();
int mCursorE = mEditText.getSelectionEnd();
mEditText.append("¤", mCursorS, mCursorE+1);
This only works the first click but forces the application to shut
down on the second click.
I have also tried:
char[] ch = new char[1];
ch[0] = '¤';
mEditText.setText(ch, mCursorS, 1);
Almost the same problem.
Anyone who knows how to do this?
André
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en