You can achieve this by using :
Edittext.setSelection(Edittext.length());
this will put the cursor position in the end. otherwise you can get the text in a string and check the text position where you want to put the cursor and do it like this
String text = edittext.getText().toString();
for(int i = 0; i <text.length();i++)
{
//your logic here to check the position of text
}
and then
Edittext.setSelection(position);