Skip to content

Instantly share code, notes, and snippets.

@ayushhgoyal
Created September 5, 2014 11:43
Show Gist options
  • Save ayushhgoyal/5240c8c8c080e354ae94 to your computer and use it in GitHub Desktop.
Save ayushhgoyal/5240c8c8c080e354ae94 to your computer and use it in GitHub Desktop.
This utility class allows to change visibility of multiple views in one call.
public class VisibilityUtil {
public static void setViewVisible(View... views) {
for (View v : views) {
v.setVisibility(View.VISIBLE);
}
}
public static void setViewGone(View... views) {
for (View v : views) {
v.setVisibility(View.GONE);
}
}
public static void setViewInvisible(View... views) {
for (View v : views) {
v.setVisibility(View.INVISIBLE);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment