Android examples for User Interface:EditText
set Text With Selection to EditText
//package com.java2s; import android.widget.EditText; public class Main { public static void setTextWithSelection(EditText editText, String str) { editText.setText(str);// w ww . j a v a2 s. c o m editText.setSelection(str.length()); } }