Android examples for User Interface:View Hide Show
hide Views With Id
//package com.java2s; import android.app.Activity; import android.view.View; public class Main { public static void hideViewsWithId(Activity activity, int... ids) { updatedViews(activity, View.GONE, ids); }//from w w w. java2s. c o m private static void updatedViews(Activity activity, int visibility, int... ids) { for (int id : ids) { View view = activity.findViewById(id); if (view != null) { view.setVisibility(visibility); } } } }