Refresh view status - Android User Interface

Android examples for User Interface:View

Description

Refresh view status

Demo Code


//package com.java2s;
import android.view.View;

public class Main {
    /**//from  ww  w.  j  a v  a  2  s .co m
     * Refresh view status
     */
    public static void setVisibleGone(View view, View... views) {
        if (null != view && view.getVisibility() != View.VISIBLE)
            view.setVisibility(View.VISIBLE);
        setGone(views);
    }

    public static void setGone(View... views) {
        if (views != null && views.length > 0) {
            for (View view : views) {
                if (null != view && view.getVisibility() != View.GONE)
                    view.setVisibility(View.GONE);
            }
        }
    }
}

Related Tutorials