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.

  1. assume current cursor @ position "5",
  2. click edittext widget @ position "8",
  3. at moment getselectionstart() retrieve previous value "5".
  4. click edittext widget @ position "8" again,
  5. getselectionstart() retrieve position become "8", (this correct, need click twice @ same position)
  6. click on new position, situation repeat step3.

just try:

   getselectionend()  

(if action doesn't contain selecting range of text.)


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -