dispatch Start Temporary Detach View - Android User Interface

Android examples for User Interface:View

Description

dispatch Start Temporary Detach View

Demo Code


//package com.java2s;

import android.view.View;
import android.view.ViewGroup;

public class Main {
    public static void dispatchStartTemporaryDetach(View view) {
        if (view instanceof ViewGroup) {
            ViewGroup viewGroup = (ViewGroup) view;
            final int count = viewGroup.getChildCount();
            for (int i = 0; i < count; i++) {
                final View child = viewGroup.getChildAt(i);
                dispatchStartTemporaryDetach(child);
            }//w w w .ja v  a  2s.  c  om
        } else {
            view.onStartTemporaryDetach();
        }
    }
}

Related Tutorials