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 getNumTVAsString(TextView tv) {
        if (isTVEmpty(tv)) {
            return "0";
        } else {
            return tv.getText().toString();
        }
    }

    public static boolean isTVEmpty(TextView tv) {
        return tv.getText().toString().trim().length() == 0;
    }
}