Loading tests/WindowInsetsTests/AndroidManifest.xml +3 −4 Original line number Original line Diff line number Diff line Loading @@ -18,7 +18,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.test.windowinsetstests"> package="com.google.android.test.windowinsetstests"> <application android:label="@string/application_title"> <application android:label="@string/application_title" android:theme="@style/base"> <activity android:name=".WindowInsetsTestsMainActivity" <activity android:name=".WindowInsetsTestsMainActivity" android:exported="true"> android:exported="true"> <intent-filter> <intent-filter> Loading @@ -29,11 +30,9 @@ <activity android:name=".ChatActivity" <activity android:name=".ChatActivity" android:label="@string/chat_activity_title" android:label="@string/chat_activity_title" android:theme="@style/chat" android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize" /> <activity android:name=".ControllerActivity" <activity android:name=".ControllerActivity" android:label="@string/controller_activity_title" android:label="@string/controller_activity_title" /> android:theme="@style/controller" /> </application> </application> </manifest> </manifest> tests/WindowInsetsTests/res/layout/controller_activity.xml +101 −83 Original line number Original line Diff line number Diff line Loading @@ -15,14 +15,29 @@ --> --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" /> <ScrollView android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent"> android:layout_height="match_parent" android:paddingStart="8dp" android:paddingEnd="8dp"> <LinearLayout <LinearLayout android:id="@+id/content" android:id="@+id/content" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> android:orientation="vertical"> <Spinner <Spinner Loading @@ -37,9 +52,9 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:checked="true" android:checked="true" android:text="Status Bars Toggle Button" android:text="@string/status_bars_toggle_button" android:textOff="Status Bars Invisible" android:textOff="@string/status_bars_invisible" android:textOn="Status Bars Visible" /> android:textOn="@string/status_bars_visible" /> <SeekBar <SeekBar android:id="@+id/seekBarStatus" android:id="@+id/seekBarStatus" Loading @@ -55,9 +70,9 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:checked="true" android:checked="true" android:text="Navigation Bars Toggle Button" android:text="@string/navigation_bars_toggle_button" android:textOff="Navigation Bars Invisible" android:textOff="@string/navigation_bars_invisible" android:textOn="Navigation Bars Visible" /> android:textOn="@string/navigation_bars_visible" /> <SeekBar <SeekBar android:id="@+id/seekBarNavigation" android:id="@+id/seekBarNavigation" Loading @@ -73,9 +88,9 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:checked="true" android:checked="true" android:text="IME Toggle Button" android:text="@string/ime_toggle_button" android:textOff="IME Invisible" android:textOff="@string/ime_invisible" android:textOn="IME Visible" /> android:textOn="@string/ime_visible" /> <SeekBar <SeekBar android:id="@+id/seekBarIme" android:id="@+id/seekBarIme" Loading @@ -97,10 +112,13 @@ android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_height="wrap_content" android:ems="10" android:ems="10" android:hint="For testing IME..." android:autofillHints="@string/for_testing_ime" android:hint="@string/for_testing_ime" android:inputType="text" android:inputType="text" android:text="" /> android:text="" /> </LinearLayout> </LinearLayout> </ScrollView> </ScrollView> </LinearLayout> tests/WindowInsetsTests/res/layout/main_activity.xml +27 −11 Original line number Original line Diff line number Diff line Loading @@ -16,10 +16,24 @@ <LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_height="match_parent" android:orientation="vertical"> android:orientation="vertical"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" /> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="8dp" android:paddingEnd="8dp"> <Button <Button android:id="@+id/chat_button" android:id="@+id/chat_button" android:layout_width="wrap_content" android:layout_width="wrap_content" Loading @@ -35,3 +49,5 @@ android:textAllCaps="false"/> android:textAllCaps="false"/> </LinearLayout> </LinearLayout> </LinearLayout> tests/WindowInsetsTests/res/values-night/styles.xml 0 → 100644 +43 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2024 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <resources> <style name="base" parent="@style/Theme.MaterialComponents"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="colorPrimary">@color/primaryColor</item> <item name="colorPrimaryDark">@color/primaryDarkColor</item> <item name="colorSecondary">?attr/colorPrimary</item> <item name="colorOnSecondary">@color/primaryTextColor</item> <!-- Window decor --> <item name="android:windowLightStatusBar">false</item> <item name="android:windowLightNavigationBar">false</item> </style> <color name="primaryColor">#639ff9</color> <color name="primaryLightColor">#6f6bff</color> <color name="primaryDarkColor">#0016bb</color> <color name="primaryTextColor">#ffffff</color> <color name="bubble">#333333</color> <color name="bubble_self">#185abc</color> </resources> tests/WindowInsetsTests/res/values/strings.xml +10 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,16 @@ <string name="application_title">Window Insets Tests</string> <string name="application_title">Window Insets Tests</string> <string name="chat_activity_title">New Insets Chat</string> <string name="chat_activity_title">New Insets Chat</string> <string name="controller_activity_title">Window Insets Controller</string> <string name="controller_activity_title">Window Insets Controller</string> <string name="status_bars_toggle_button">Status Bars Toggle Button</string> <string name="status_bars_invisible">Status Bars Invisible</string> <string name="status_bars_visible">Status Bars Visible</string> <string name="navigation_bars_toggle_button">Navigation Bars Toggle Button</string> <string name="navigation_bars_invisible">Navigation Bars Invisible</string> <string name="navigation_bars_visible">Navigation Bars Visible</string> <string name="ime_toggle_button">IME Bars Toggle Button</string> <string name="ime_invisible">IME Bars Invisible</string> <string name="ime_visible">IME Bars Visible</string> <string name="for_testing_ime">For testing IME…</string> <!-- The item positions should match the flag values respectively. --> <!-- The item positions should match the flag values respectively. --> <string-array name="behaviors"> <string-array name="behaviors"> Loading Loading
tests/WindowInsetsTests/AndroidManifest.xml +3 −4 Original line number Original line Diff line number Diff line Loading @@ -18,7 +18,8 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.android.test.windowinsetstests"> package="com.google.android.test.windowinsetstests"> <application android:label="@string/application_title"> <application android:label="@string/application_title" android:theme="@style/base"> <activity android:name=".WindowInsetsTestsMainActivity" <activity android:name=".WindowInsetsTestsMainActivity" android:exported="true"> android:exported="true"> <intent-filter> <intent-filter> Loading @@ -29,11 +30,9 @@ <activity android:name=".ChatActivity" <activity android:name=".ChatActivity" android:label="@string/chat_activity_title" android:label="@string/chat_activity_title" android:theme="@style/chat" android:windowSoftInputMode="adjustResize" /> android:windowSoftInputMode="adjustResize" /> <activity android:name=".ControllerActivity" <activity android:name=".ControllerActivity" android:label="@string/controller_activity_title" android:label="@string/controller_activity_title" /> android:theme="@style/controller" /> </application> </application> </manifest> </manifest>
tests/WindowInsetsTests/res/layout/controller_activity.xml +101 −83 Original line number Original line Diff line number Diff line Loading @@ -15,14 +15,29 @@ --> --> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" /> <ScrollView android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent"> android:layout_height="match_parent" android:paddingStart="8dp" android:paddingEnd="8dp"> <LinearLayout <LinearLayout android:id="@+id/content" android:id="@+id/content" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> android:orientation="vertical"> <Spinner <Spinner Loading @@ -37,9 +52,9 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:checked="true" android:checked="true" android:text="Status Bars Toggle Button" android:text="@string/status_bars_toggle_button" android:textOff="Status Bars Invisible" android:textOff="@string/status_bars_invisible" android:textOn="Status Bars Visible" /> android:textOn="@string/status_bars_visible" /> <SeekBar <SeekBar android:id="@+id/seekBarStatus" android:id="@+id/seekBarStatus" Loading @@ -55,9 +70,9 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:checked="true" android:checked="true" android:text="Navigation Bars Toggle Button" android:text="@string/navigation_bars_toggle_button" android:textOff="Navigation Bars Invisible" android:textOff="@string/navigation_bars_invisible" android:textOn="Navigation Bars Visible" /> android:textOn="@string/navigation_bars_visible" /> <SeekBar <SeekBar android:id="@+id/seekBarNavigation" android:id="@+id/seekBarNavigation" Loading @@ -73,9 +88,9 @@ android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_height="wrap_content" android:checked="true" android:checked="true" android:text="IME Toggle Button" android:text="@string/ime_toggle_button" android:textOff="IME Invisible" android:textOff="@string/ime_invisible" android:textOn="IME Visible" /> android:textOn="@string/ime_visible" /> <SeekBar <SeekBar android:id="@+id/seekBarIme" android:id="@+id/seekBarIme" Loading @@ -97,10 +112,13 @@ android:layout_width="wrap_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_height="wrap_content" android:ems="10" android:ems="10" android:hint="For testing IME..." android:autofillHints="@string/for_testing_ime" android:hint="@string/for_testing_ime" android:inputType="text" android:inputType="text" android:text="" /> android:text="" /> </LinearLayout> </LinearLayout> </ScrollView> </ScrollView> </LinearLayout>
tests/WindowInsetsTests/res/layout/main_activity.xml +27 −11 Original line number Original line Diff line number Diff line Loading @@ -16,10 +16,24 @@ <LinearLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/root" android:layout_width="match_parent" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_height="match_parent" android:orientation="vertical"> android:orientation="vertical"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" /> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingStart="8dp" android:paddingEnd="8dp"> <Button <Button android:id="@+id/chat_button" android:id="@+id/chat_button" android:layout_width="wrap_content" android:layout_width="wrap_content" Loading @@ -35,3 +49,5 @@ android:textAllCaps="false"/> android:textAllCaps="false"/> </LinearLayout> </LinearLayout> </LinearLayout>
tests/WindowInsetsTests/res/values-night/styles.xml 0 → 100644 +43 −0 Original line number Original line Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2024 The Android Open Source Project ~ ~ Licensed under the Apache License, Version 2.0 (the "License"); ~ you may not use this file except in compliance with the License. ~ You may obtain a copy of the License at ~ ~ http://www.apache.org/licenses/LICENSE-2.0 ~ ~ Unless required by applicable law or agreed to in writing, software ~ distributed under the License is distributed on an "AS IS" BASIS, ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the License for the specific language governing permissions and ~ limitations under the License. --> <resources> <style name="base" parent="@style/Theme.MaterialComponents"> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="colorPrimary">@color/primaryColor</item> <item name="colorPrimaryDark">@color/primaryDarkColor</item> <item name="colorSecondary">?attr/colorPrimary</item> <item name="colorOnSecondary">@color/primaryTextColor</item> <!-- Window decor --> <item name="android:windowLightStatusBar">false</item> <item name="android:windowLightNavigationBar">false</item> </style> <color name="primaryColor">#639ff9</color> <color name="primaryLightColor">#6f6bff</color> <color name="primaryDarkColor">#0016bb</color> <color name="primaryTextColor">#ffffff</color> <color name="bubble">#333333</color> <color name="bubble_self">#185abc</color> </resources>
tests/WindowInsetsTests/res/values/strings.xml +10 −0 Original line number Original line Diff line number Diff line Loading @@ -19,6 +19,16 @@ <string name="application_title">Window Insets Tests</string> <string name="application_title">Window Insets Tests</string> <string name="chat_activity_title">New Insets Chat</string> <string name="chat_activity_title">New Insets Chat</string> <string name="controller_activity_title">Window Insets Controller</string> <string name="controller_activity_title">Window Insets Controller</string> <string name="status_bars_toggle_button">Status Bars Toggle Button</string> <string name="status_bars_invisible">Status Bars Invisible</string> <string name="status_bars_visible">Status Bars Visible</string> <string name="navigation_bars_toggle_button">Navigation Bars Toggle Button</string> <string name="navigation_bars_invisible">Navigation Bars Invisible</string> <string name="navigation_bars_visible">Navigation Bars Visible</string> <string name="ime_toggle_button">IME Bars Toggle Button</string> <string name="ime_invisible">IME Bars Invisible</string> <string name="ime_visible">IME Bars Visible</string> <string name="for_testing_ime">For testing IME…</string> <!-- The item positions should match the flag values respectively. --> <!-- The item positions should match the flag values respectively. --> <string-array name="behaviors"> <string-array name="behaviors"> Loading