Java tutorial
//package com.java2s; import android.widget.TextView; public class Main { public static void setTextViewColor(TextView textview, int i) { if (isValidInAppMessageColor(i)) { textview.setTextColor(i); } } public static boolean isValidInAppMessageColor(int i) { return i != 0; } }