From ab008f0c642461b033e6f7dd3edfc49a43fb6293 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Fri, 23 May 2014 17:55:03 -0700 Subject: Respect Z ordering in touch dispatch, software drawing bug:14390526 Change-Id: I617a6ea7dbac1facae246491a247cf307452fc0e --- tests/HwAccelerationTest/AndroidManifest.xml | 9 +++++++ tests/HwAccelerationTest/res/layout/z_ordering.xml | 17 +++++++++++++ tests/HwAccelerationTest/res/values/styles.xml | 25 ++++++++++--------- .../com/android/test/hwui/ZOrderingActivity.java | 28 ++++++++++++++++++++++ 4 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 tests/HwAccelerationTest/res/layout/z_ordering.xml create mode 100644 tests/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java (limited to 'tests/HwAccelerationTest') diff --git a/tests/HwAccelerationTest/AndroidManifest.xml b/tests/HwAccelerationTest/AndroidManifest.xml index db802c5..6b70631 100644 --- a/tests/HwAccelerationTest/AndroidManifest.xml +++ b/tests/HwAccelerationTest/AndroidManifest.xml @@ -902,5 +902,14 @@ + + + + + + + diff --git a/tests/HwAccelerationTest/res/layout/z_ordering.xml b/tests/HwAccelerationTest/res/layout/z_ordering.xml new file mode 100644 index 0000000..970c5fd --- /dev/null +++ b/tests/HwAccelerationTest/res/layout/z_ordering.xml @@ -0,0 +1,17 @@ + + + + + + + + + \ No newline at end of file diff --git a/tests/HwAccelerationTest/res/values/styles.xml b/tests/HwAccelerationTest/res/values/styles.xml index cde5d20..108709b 100644 --- a/tests/HwAccelerationTest/res/values/styles.xml +++ b/tests/HwAccelerationTest/res/values/styles.xml @@ -1,34 +1,37 @@ diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java new file mode 100644 index 0000000..45e77ed --- /dev/null +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ZOrderingActivity.java @@ -0,0 +1,28 @@ +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); + } + } + } +} -- cgit v1.1