Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.widget.TextView;

public class Main {

    public static String getViewText(TextView view) {
        if (view == null) {
            return "0";
        }
        boolean empty = android.text.TextUtils.isEmpty(view.getText().toString());
        return empty ? "0" : view.getText().toString();
    }
}