Android examples for User Interface:View Hide Show
show Views With Id
//package com.java2s; import android.app.Activity; import android.view.View; public class Main { public static void showViewsWithId(Activity activity, int... ids) { updatedViews(activity, View.VISIBLE, ids); }//from w ww.ja v a2 s . co 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); } } } }