Set Cursor Position in custom edittext

I have a custom EditText which is empty and I want to set the cursor position using the co-ordinates(x,y) i get from ontouch event. Wherever I touch i should be able to move the cursor to that position and should be able to type the text from there. Help me out...

Answers


Try

Selection.setSelection (Spannable text, int index);

Need Your Help

How do I connect R to someone else's MySql server?

mysql r rmysql

I used the following code to connect R to my own MySQL server (i.e. localhost server).

how to stop buffering(blinking ) in my applet

java graphics japplet

I am making a card game with a java applet. I have a class that extends JApplet. Now I am trying to draw 104 images on applet, but when I drag one image and move, my entire applet is blinking. Thro...