summaryrefslogtreecommitdiffstats
path: root/tests/HwAccelerationTest
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-03-03 11:40:23 -0800
committerChris Craik <ccraik@google.com>2014-03-03 11:43:43 -0800
commit6dbca96f0858372e4ba8214bc94876b9a0222ea7 (patch)
tree51b99a92c4f36d3fd33a182caa777461e6c89af8 /tests/HwAccelerationTest
parentadbd2ba1bcc222ce47e24d0db180bb85eefae371 (diff)
downloadframeworks_base-6dbca96f0858372e4ba8214bc94876b9a0222ea7.zip
frameworks_base-6dbca96f0858372e4ba8214bc94876b9a0222ea7.tar.gz
frameworks_base-6dbca96f0858372e4ba8214bc94876b9a0222ea7.tar.bz2
Improve isolatedZVolume test
Shows interleaving effect better Change-Id: I85361b15587306484dc8fa6d6366e866014c270f
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r--tests/HwAccelerationTest/res/layout/isolation.xml14
-rw-r--r--tests/HwAccelerationTest/res/values/styles.xml6
2 files changed, 13 insertions, 7 deletions
diff --git a/tests/HwAccelerationTest/res/layout/isolation.xml b/tests/HwAccelerationTest/res/layout/isolation.xml
index 802ac7f..32eb628 100644
--- a/tests/HwAccelerationTest/res/layout/isolation.xml
+++ b/tests/HwAccelerationTest/res/layout/isolation.xml
@@ -5,13 +5,15 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f55">
+ <!-- Left and right layouts are not isolated volumes, so the text views
+ will interleave since they share an isolated z volume-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
- android:layout_height="150dp"
+ android:layout_height="200dp"
android:layout_weight="1"
android:isolatedZVolume="false"
android:orientation="vertical">
@@ -20,21 +22,24 @@
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
- android:layout_height="150dp"
+ android:layout_height="200dp"
android:layout_weight="1"
+ android:translationY="50dp"
android:isolatedZVolume="false"
android:orientation="vertical">
<TextView style="@style/TopRightReorderTextView"/>
<TextView style="@style/BottomRightReorderTextView"/>
</LinearLayout>
</LinearLayout>
+
+ <!-- Left and right volumes are isolated by default, so no interleaving will be seen. -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
- android:layout_height="150dp"
+ android:layout_height="200dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView style="@style/TopLeftReorderTextView"/>
@@ -42,8 +47,9 @@
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
- android:layout_height="150dp"
+ android:layout_height="200dp"
android:layout_weight="1"
+ android:translationY="50dp"
android:orientation="vertical">
<TextView style="@style/TopRightReorderTextView"/>
<TextView style="@style/BottomRightReorderTextView"/>
diff --git a/tests/HwAccelerationTest/res/values/styles.xml b/tests/HwAccelerationTest/res/values/styles.xml
index 0ffd3d7..cde5d20 100644
--- a/tests/HwAccelerationTest/res/values/styles.xml
+++ b/tests/HwAccelerationTest/res/values/styles.xml
@@ -1,14 +1,14 @@
<resources>
<style name="ReorderTextView" parent="@android:style/TextAppearance.Medium">
<item name="android:layout_width">match_parent</item>
- <item name="android:layout_height">75dp</item>
+ <item name="android:layout_height">100dp</item>
<item name="android:gravity">center</item>
</style>
<style name="LeftReorderTextView" parent="@style/ReorderTextView">
- <item name="android:translationX">50dp</item>
+ <item name="android:translationX">20dp</item>
</style>
<style name="RightReorderTextView" parent="@style/ReorderTextView">
- <item name="android:translationX">-50dp</item>
+ <item name="android:translationX">-20dp</item>
</style>
<style name="TopLeftReorderTextView" parent="@style/LeftReorderTextView">