Java tutorial
//package com.java2s; import android.view.View; public class Main { public static void setViewInvisible(View view) { if (view != null) { view.setVisibility(View.INVISIBLE); } else { throw new IllegalArgumentException("A view is null in your parameter."); } } }