FileDocCategorySizeDatePackage
ZOrderingActivity.javaAPI DocAndroid 5.1 API947Thu Mar 12 22:22:44 GMT 2015com.android.test.hwui

ZOrderingActivity.java

package com.android.test.hwui;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;

public class ZOrderingActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.z_ordering);

        ViewGroup grandParent = (ViewGroup) findViewById(R.id.parent);
        if (grandParent == null) throw new IllegalStateException();
        View.OnClickListener l = new View.OnClickListener() {
            @Override
            public void onClick(View v) {}
        };
        for (int i = 0; i < grandParent.getChildCount(); i++) {
            ViewGroup parent = (ViewGroup) grandParent.getChildAt(i);
            for (int j = 0; j < parent.getChildCount(); j++) {
                parent.getChildAt(j).setOnClickListener(l);
            }
        }
    }
}