Set null layout view. - Android User Interface

Android examples for User Interface:Layout

Description

Set null layout view.

Demo Code


//package com.java2s;

import android.view.View;

public class Main {
    /**//from  ww w.ja  v a2s .com
     * Set null view.
     * 
     * @param pview
     */
    public static void setNullLayout(View pview) {
        if (pview != null) {
            pview.setBackgroundDrawable(null);
            pview.setBackgroundResource(0);
            pview.destroyDrawingCache();
        }
    }
}

Related Tutorials