Given an EditText and its OnTouch event, I overridden it, and returned true. This prevents the soft keys from showing up. But it also prevents inner calculation of the position index inside the EditText. That is myEditText.getSelectionStart() will return always 0.
Is there a way to calculate (or an Android function that can calculate) the position index based on the MotionEvent argument of the OnTouch event?
Thanks.
After searching SO and googling I understand the solution isn’t clear.
So I solved it by compromising.
I supply right/left arrows on my keyboard with which the user can move the cursor.
If the user taps the edit text while my keyboard is shown, he will get a Toast telling him to use the keyboard for what he’s trying to do.