Android EditText's cursor position tracking when clicking or toching by first time itself -
i struggling edittext morethan day. goal know current cursor positon user's first click on edittext.
- assume current cursor @ position "5",
- click edittext widget @ position "8",
- at moment getselectionstart() retrieve previous value "5".
- click edittext widget @ position "8" again,
getselectionstart()
retrieve position become "8", (this correct, need click twice @ same position)- click on new position, situation repeat step3.
just try:
getselectionend()
(if action doesn't contain selecting range of text.)
Comments
Post a Comment