Java tutorial
//package com.java2s; import android.widget.EditText; public class Main { /** * Get the text from an edit text. * @param edit edit text to extract text from * @return text extracted from the edit text */ public static String getEditText(EditText edit) { String returnText; try { returnText = edit.getText().toString(); } catch (NullPointerException ex) { returnText = ""; } return returnText; } }