From 2345831a0a95a70c183ee2280c1ffa52f9447550 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Tue, 28 Jan 2020 17:24:50 +0100 Subject: [PATCH] WindowInsetsTests: More compelling IME transition sample Test: make WindowInsetsTests && adb install ... Change-Id: I4320871bdc8184fac38921616e1a1322f8dbc804 --- tests/WindowInsetsTests/Android.bp | 5 + tests/WindowInsetsTests/AndroidManifest.xml | 2 +- .../WindowInsetsTests/res/drawable/bubble.xml | 23 ++ .../res/drawable/bubble_self.xml | 23 ++ .../res/drawable/ic_send.xml | 27 ++ .../WindowInsetsTests/res/layout/message.xml | 26 ++ .../res/layout/message_self.xml | 30 +++ .../res/layout/window_inset_activity.xml | 77 +++++- .../WindowInsetsTests/res/values/strings.xml | 2 +- tests/WindowInsetsTests/res/values/styles.xml | 67 +++++ .../WindowInsetsActivity.java | 236 ++++++++++++------ 11 files changed, 433 insertions(+), 85 deletions(-) create mode 100644 tests/WindowInsetsTests/res/drawable/bubble.xml create mode 100644 tests/WindowInsetsTests/res/drawable/bubble_self.xml create mode 100644 tests/WindowInsetsTests/res/drawable/ic_send.xml create mode 100644 tests/WindowInsetsTests/res/layout/message.xml create mode 100644 tests/WindowInsetsTests/res/layout/message_self.xml create mode 100644 tests/WindowInsetsTests/res/values/styles.xml diff --git a/tests/WindowInsetsTests/Android.bp b/tests/WindowInsetsTests/Android.bp index 12395e70468d2..7272152dc2579 100644 --- a/tests/WindowInsetsTests/Android.bp +++ b/tests/WindowInsetsTests/Android.bp @@ -18,5 +18,10 @@ android_test { resource_dirs: ["res"], certificate: "platform", platform_apis: true, + static_libs: [ + "androidx.core_core", + "androidx.appcompat_appcompat", + "com.google.android.material_material", + ], } diff --git a/tests/WindowInsetsTests/AndroidManifest.xml b/tests/WindowInsetsTests/AndroidManifest.xml index 8d33f70c33a26..0f6282e20b41a 100644 --- a/tests/WindowInsetsTests/AndroidManifest.xml +++ b/tests/WindowInsetsTests/AndroidManifest.xml @@ -20,7 +20,7 @@ diff --git a/tests/WindowInsetsTests/res/drawable/bubble.xml b/tests/WindowInsetsTests/res/drawable/bubble.xml new file mode 100644 index 0000000000000..26deb1e59e415 --- /dev/null +++ b/tests/WindowInsetsTests/res/drawable/bubble.xml @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/tests/WindowInsetsTests/res/drawable/bubble_self.xml b/tests/WindowInsetsTests/res/drawable/bubble_self.xml new file mode 100644 index 0000000000000..5f098a2fea60d --- /dev/null +++ b/tests/WindowInsetsTests/res/drawable/bubble_self.xml @@ -0,0 +1,23 @@ + + + + + + + + \ No newline at end of file diff --git a/tests/WindowInsetsTests/res/drawable/ic_send.xml b/tests/WindowInsetsTests/res/drawable/ic_send.xml new file mode 100644 index 0000000000000..15bc411e85fb5 --- /dev/null +++ b/tests/WindowInsetsTests/res/drawable/ic_send.xml @@ -0,0 +1,27 @@ + + + + + + diff --git a/tests/WindowInsetsTests/res/layout/message.xml b/tests/WindowInsetsTests/res/layout/message.xml new file mode 100644 index 0000000000000..d6b29c33f662a --- /dev/null +++ b/tests/WindowInsetsTests/res/layout/message.xml @@ -0,0 +1,26 @@ + + + + + + \ No newline at end of file diff --git a/tests/WindowInsetsTests/res/layout/message_self.xml b/tests/WindowInsetsTests/res/layout/message_self.xml new file mode 100644 index 0000000000000..de34e48963318 --- /dev/null +++ b/tests/WindowInsetsTests/res/layout/message_self.xml @@ -0,0 +1,30 @@ + + + + + + + + + + diff --git a/tests/WindowInsetsTests/res/layout/window_inset_activity.xml b/tests/WindowInsetsTests/res/layout/window_inset_activity.xml index 38e00298f49fa..1b51c4f83fe08 100644 --- a/tests/WindowInsetsTests/res/layout/window_inset_activity.xml +++ b/tests/WindowInsetsTests/res/layout/window_inset_activity.xml @@ -17,17 +17,82 @@ -