summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2014-01-29 22:51:29 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-01-29 22:51:29 +0000
commitde439dbe2c395a0c61331ffad567af1124782e6b (patch)
tree6083c4bcfce8fa5682952089d95be61c7f18c44d /tests
parent5e31fdbacd11fa3750b82004aa80cef0260951e9 (diff)
parent6657a6c53930eb0ff8d03317eb10ea7ddb0c49b4 (diff)
downloadframeworks_base-de439dbe2c395a0c61331ffad567af1124782e6b.zip
frameworks_base-de439dbe2c395a0c61331ffad567af1124782e6b.tar.gz
frameworks_base-de439dbe2c395a0c61331ffad567af1124782e6b.tar.bz2
Merge "Update reordering method names, and make 3d reordering API public"
Diffstat (limited to 'tests')
-rw-r--r--tests/HwAccelerationTest/AndroidManifest.xml9
-rw-r--r--tests/HwAccelerationTest/res/layout/isolation.xml52
-rw-r--r--tests/HwAccelerationTest/res/values/styles.xml34
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/IsolationVolumeActivity.java12
-rw-r--r--tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java2
5 files changed, 108 insertions, 1 deletions
diff --git a/tests/HwAccelerationTest/AndroidManifest.xml b/tests/HwAccelerationTest/AndroidManifest.xml
index 0ad3456..c8eefe0 100644
--- a/tests/HwAccelerationTest/AndroidManifest.xml
+++ b/tests/HwAccelerationTest/AndroidManifest.xml
@@ -867,5 +867,14 @@
</intent-filter>
</activity>
+ <activity
+ android:name="IsolationVolumeActivity"
+ android:label="Reordering/IsolationVolume">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="com.android.test.hwui.TEST" />
+ </intent-filter>
+ </activity>
+
</application>
</manifest>
diff --git a/tests/HwAccelerationTest/res/layout/isolation.xml b/tests/HwAccelerationTest/res/layout/isolation.xml
new file mode 100644
index 0000000..802ac7f
--- /dev/null
+++ b/tests/HwAccelerationTest/res/layout/isolation.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:background="#f55">
+ <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_weight="1"
+ android:isolatedZVolume="false"
+ android:orientation="vertical">
+ <TextView style="@style/TopLeftReorderTextView"/>
+ <TextView style="@style/BottomLeftReorderTextView"/>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="150dp"
+ android:layout_weight="1"
+ android:isolatedZVolume="false"
+ android:orientation="vertical">
+ <TextView style="@style/TopRightReorderTextView"/>
+ <TextView style="@style/BottomRightReorderTextView"/>
+ </LinearLayout>
+ </LinearLayout>
+ <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_weight="1"
+ android:orientation="vertical">
+ <TextView style="@style/TopLeftReorderTextView"/>
+ <TextView style="@style/BottomLeftReorderTextView"/>
+ </LinearLayout>
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="150dp"
+ android:layout_weight="1"
+ android:orientation="vertical">
+ <TextView style="@style/TopRightReorderTextView"/>
+ <TextView style="@style/BottomRightReorderTextView"/>
+ </LinearLayout>
+ </LinearLayout>
+</LinearLayout> \ No newline at end of file
diff --git a/tests/HwAccelerationTest/res/values/styles.xml b/tests/HwAccelerationTest/res/values/styles.xml
new file mode 100644
index 0000000..0ffd3d7
--- /dev/null
+++ b/tests/HwAccelerationTest/res/values/styles.xml
@@ -0,0 +1,34 @@
+<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:gravity">center</item>
+ </style>
+ <style name="LeftReorderTextView" parent="@style/ReorderTextView">
+ <item name="android:translationX">50dp</item>
+ </style>
+ <style name="RightReorderTextView" parent="@style/ReorderTextView">
+ <item name="android:translationX">-50dp</item>
+ </style>
+
+ <style name="TopLeftReorderTextView" parent="@style/LeftReorderTextView">
+ <item name="android:background">#666</item>
+ <item name="android:text">100</item>
+ <item name="android:translationZ">100dp</item>
+ </style>
+ <style name="BottomLeftReorderTextView" parent="@style/LeftReorderTextView">
+ <item name="android:background">#bbb</item>
+ <item name="android:text">300</item>
+ <item name="android:translationZ">300dp</item>
+ </style>
+ <style name="TopRightReorderTextView" parent="@style/RightReorderTextView">
+ <item name="android:background">#888</item>
+ <item name="android:text">200</item>
+ <item name="android:translationZ">200dp</item>
+ </style>
+ <style name="BottomRightReorderTextView" parent="@style/RightReorderTextView">
+ <item name="android:background">#ccc</item>
+ <item name="android:text">400</item>
+ <item name="android:translationZ">400dp</item>
+ </style>
+</resources>
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/IsolationVolumeActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/IsolationVolumeActivity.java
new file mode 100644
index 0000000..d5c93f2
--- /dev/null
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/IsolationVolumeActivity.java
@@ -0,0 +1,12 @@
+package com.android.test.hwui;
+
+import android.os.Bundle;
+import android.app.Activity;
+
+public class IsolationVolumeActivity extends Activity {
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.isolation);
+ }
+}
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java
index 51a6803..f27652d 100644
--- a/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java
+++ b/tests/HwAccelerationTest/src/com/android/test/hwui/ProjectionActivity.java
@@ -48,7 +48,7 @@ public class ProjectionActivity extends Activity {
private void setProject(boolean value) {
DisplayList displayList = getDisplayList();
if (displayList != null) {
- displayList.setProjectToContainedVolume(value);
+ displayList.setProjectBackwards(value);
}
// NOTE: we can't invalidate ProjectedView for the redraw because:
// 1) the view won't preserve displayList properties that it doesn't know about