RequestManageCredentials dark theme
Manual testing steps
* Enable dark theme via Settings > display
* Install TestDPC and select 'Request to manage credentials'
* Verify dark theme is displayed (including light text)
Bug: 177901172
Test: atest com.android.settings.security.RequestManageCredentialsTest
manual testing
Change-Id: I6db1361ffcbf1e193673eb5ca7ef3f403d5023b1
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index ce80fc5..fa2bbc9 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1459,7 +1459,7 @@
</activity>
<activity android:name=".security.RequestManageCredentials"
- android:theme="@style/Theme.RequestManageCredentials"
+ android:theme="@style/Theme.SubSettings"
android:exported="true">
<intent-filter>
<action android:name="android.security.MANAGE_CREDENTIALS"/>
diff --git a/res/layout/request_manage_credentials.xml b/res/layout/request_manage_credentials.xml
index a2350ac..ee3751c 100644
--- a/res/layout/request_manage_credentials.xml
+++ b/res/layout/request_manage_credentials.xml
@@ -18,7 +18,8 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
- android:layout_height="wrap_content">
+ android:layout_height="wrap_content"
+ android:clipChildren="true">
<RelativeLayout
android:layout_width="match_parent"
@@ -70,6 +71,7 @@
app:elevation="3dp"
app:icon="@drawable/ic_arrow_downward"
app:iconTint="?android:attr/colorAccent"
- app:backgroundTint="?android:attr/colorPrimary"/>
+ app:backgroundTint="?android:attr/colorPrimary"
+ android:theme="@style/Theme.CollapsingToolbar.Settings"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 078c6b6..c878b5f 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -804,6 +804,7 @@
<item name="android:paddingBottom">8dp</item>
<item name="android:orientation">horizontal</item>
<item name="android:layout_alignParentBottom">true</item>
+ <item name="android:background">?android:colorBackground</item>
</style>
<style name="RequestManageCredentialsAllowButton" parent="@style/ActionPrimaryButton">
diff --git a/res/values/themes.xml b/res/values/themes.xml
index d7b3257..037e0f8 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -162,21 +162,6 @@
<item name="android:colorAccent">@*android:color/white</item>
</style>
- <style name="Theme.RequestManageCredentials" parent="@style/Theme.MaterialComponents.Light">
- <item name="windowActionBar">false</item>
- <item name="windowNoTitle">true</item>
-
- <item name="colorPrimary">@*android:color/primary_device_default_settings_light</item>
- <item name="colorAccent">@*android:color/accent_device_default_light</item>
- <item name="colorPrimaryDark">@*android:color/primary_dark_device_default_settings_light</item>
-
- <item name="android:windowBackground">@android:color/white</item>
- <item name="android:statusBarColor">@android:color/white</item>
- <item name="android:windowLightStatusBar">true</item>
- <item name="android:windowLightNavigationBar">true</item>
- <item name="android:navigationBarColor">@android:color/white</item>
- </style>
-
<style name="FallbackHome" parent="@android:style/Theme.DeviceDefault.NoActionBar">
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>