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