Android examples for User Interface:EditText
get Edit Text Value
//package com.java2s; import android.app.Activity; import android.widget.EditText; public class Main { public static String getEditTextValue(Activity activity, int resId) { EditText editText = findViewById(activity, resId); return editText.getText().toString(); }/* www . j a v a 2 s . c om*/ @SuppressWarnings("unchecked") public static <T> T findViewById(Activity activity, int id) { return (T) activity.findViewById(id); } }