Android examples for User Interface:View Property
set View Visiblity Otherwise Gone
//package com.java2s; import android.view.View; public class Main { public static boolean setVisiblityOtherwiseGone(boolean vVisible, View vView) {// w w w .ja v a2 s.c o m int picVisibility; if (vVisible == true) { picVisibility = View.VISIBLE; } else { picVisibility = View.GONE; } vView.setVisibility(picVisibility); return vVisible; } }