Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import android.text.Editable;

import android.widget.EditText;

public class Main {
    public static String getEditTextValue(EditText editText) {
        String result = "";
        if (editText == null)
            return result;

        Editable editable = editText.getText();
        if (editable == null)
            return result;

        result = editable.toString();
        if (result == null)
            result = "";
        return result.trim();
    }
}