set View Visibility - Android User Interface

Android examples for User Interface:View

Description

set View Visibility

Demo Code


//package com.java2s;

import android.view.View;

public class Main {
    public static void setViewVisibility(View view, int visibility) {

        if (null == view) {
            return;
        }/*from  www.j av  a2 s .c om*/

        if (view.getVisibility() != visibility) {
            view.setVisibility(visibility);
        }
    }
}

Related Tutorials