maihannijat/AndroidKeyboard

Issue with Cursor position after typing in-between existing text and pressing Space Key

mazyaf opened this issue · 2 comments

Issue with Cursor position after typing in-between existing text and pressing Space Key

hello have you found the solution I also need help in this.. Thanks

Hi
everyone i have solved above issue.

SoftKeyboard.java file are there in project edit this file as per i edit and after working perfect

issue is that "db" are not initialize so db object are not getting when you press space key object ( if (mPredictionOn) db = new DatabaseManager(this);) here are this line to initialize "db" object but this condition are never true in application so application are crash when user press space key i have doing solution above condition

if (mCurKeyboard == mPashtoLatinKeyboard || mCurKeyboard == mPashtoLatinShiftedKeyboard)
mPredictionOn = false;

    this condition are there so here you need to write set 'mPredictionOn' boolean variable to true so 'db'  object are initialize 

so above condition are as change as per my logic

if (mCurKeyboard == mPashtoLatinKeyboard || mCurKeyboard == mPashtoLatinShiftedKeyboard) {
mPredictionOn = false;
} else {
mPredictionOn = true;
}

so finaly done with above condition and now you will be able to give space as per you want whenever

and let me know if you are facing any issue after changing this condition
Thanks