Android examples for User Interface:EditText
move Select To EditText End
//package com.java2s; import android.widget.EditText; public class Main { public static void moveToEnd(EditText edit) { if (edit.getText() == null) return; edit.setSelection(edit.getText().toString().length()); }/* w w w . jav a2s . c o m*/ public static String getText(EditText edit) { if (edit.getText() == null) return ""; return edit.getText().toString(); } }