I'm android's beginner developer , I downloaded source code for sample SoftKeyboard
https://android.googlesource.com/platform/development/+/android-2.3.3_r1.1/samples/SoftKeyboard
First i had problem which is
"When Typing a letter/letters , and switching to Symbol Keyboard , and type a number , the previous letter/letters Typed is Removed"
i fixed it by removing else
from method handleCharacter()
in SoftKeyboard.java
private void handleCharacter(int primaryCode, int[] keyCodes) { if (isInputViewShown()) { if (mInputView.isShifted()) { primaryCode = Character.toUpperCase(primaryCode); } } if (isAlphabet(primaryCode) && mPredictionOn) { mComposing.append((char) primaryCode); getCurrentInputConnection().setComposingText(mComposing, 1); updateShiftKeyState(getCurrentInputEditorInfo()); updateCandidates(); } //The following line was moved out of the else clause getCurrentInputConnection().commitText( String.valueOf((char) primaryCode), 1); }
but now i have another problem......
When typing letter then press space or delete , This letter doubled(ex: a > aa).