List of usage examples for android.widget EditText getText
@Override
public Editable getText()
From source file:Main.java
static char[] EditTextToArray(EditText editText) { char[] chars = new char[editText.getText().length()]; editText.getText().getChars(0, chars.length, chars, 0); return chars; }
From source file:Main.java
public static String getEditTextAsValueTrimToNull(EditText view) { String nameDirty = view.getText().toString(); return trimToNull(nameDirty); }
From source file:Main.java
public static double readDoubleFromEditText(EditText mEditText) { String payString = mEditText.getText().toString(); double payDouble = 0.0; if (payString.length() > 0) payDouble = Double.parseDouble(payString); return payDouble; }
From source file:Main.java
public static boolean chechField(EditText editText) { return TextUtils.isEmpty(editText.getText().toString().trim()); }
From source file:Main.java
public static void setEditCursor(EditText editText) { CharSequence text = editText.getText(); //Debug.asserts(text instanceof Spannable); if (text instanceof Spannable) { Spannable spanText = (Spannable) text; Selection.setSelection(spanText, text.length()); }/*from www.ja va 2 s .c o m*/ }
From source file:Main.java
public static boolean editTextIsNullOrEmpty(EditText editText) { return stringIsNullOrEmpty(editText.getText().toString()); }
From source file:Main.java
public static String checkEditText(EditText editText) { if (editText != null && editText.getText() != null && !(editText.getText().toString().trim().equals(""))) { return editText.getText().toString().trim(); } else {//w ww.ja va2s .co m return ""; } }
From source file:Main.java
public static void setEditTextCursorLocation(EditText editText) { CharSequence text = editText.getText(); if (text instanceof Spannable) { Spannable spanText = (Spannable) text; Selection.setSelection(spanText, text.length()); }//from w w w. j a v a2 s .c o m }
From source file:Main.java
public static void setCursorLocation(Context context, EditText editText) { CharSequence text = editText.getText(); if (text instanceof Spannable) { Spannable spanText = (Spannable) text; Selection.setSelection(spanText, text.length()); }/* www .j ava 2 s . c om*/ }
From source file:Main.java
public static boolean isCompare(EditText et1, EditText et2) { String a = et1.getText().toString(); String b = et2.getText().toString(); /*jika a sama dengan b*/ if (a.equals(b)) { return false; } else {// w ww .ja v a 2 s . c o m return true; } }