Move Cursor to the end of EditText - Android android.database

Android examples for android.database:Cursor

Description

Move Cursor to the end of EditText

Demo Code

import android.widget.EditText;

public class Main{

    public static void endEtCursor(EditText et) {
        String str = et.getEditableText().toString();
        if (str == null)
            str = "";
        et.setSelection(str.length());//from  w w w.j  a va2s .  c om
    }

}

Related Tutorials