dispatch Finish Temporary Detach View - Android User Interface

Android examples for User Interface:View

Description

dispatch Finish Temporary Detach View

Demo Code


//package com.java2s;

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

public class Main {
    public static void dispatchFinishTemporaryDetach(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);
                dispatchFinishTemporaryDetach(child);
            }//from   ww w.j  av a 2 s .c  om
        } else {
            view.onFinishTemporaryDetach();
        }
    }
}

Related Tutorials