Here you can find the source of setText(TextView tv, int str)
public static void setText(TextView tv, int str)
//package com.java2s; import android.widget.TextView; public class Main { public static void setText(TextView tv, String str) { if (tv == null) { return; }/*w w w . j a va 2 s . c om*/ tv.setText(checkStr(str)); } public static void setText(TextView tv, int str) { if (tv == null) { return; } tv.setText(str + ""); } public static String checkStr(String str) { if (str != null && !str.equals("")) { return str; } else { return ""; } } }