[WifiSetup] Use adjustResize for alert dialogs during Setup
Created theme ThemeOverlay.AlertDialog that inherits from the default
ThemeOverlay.Material.Dialog.Alert and sets the windowSoftInputMode
to adjustResize.
Bug: 20953227
Change-Id: I20af124b6d92bff3a5807b2f8475acda92c90208
diff --git a/res/values/themes.xml b/res/values/themes.xml
index a0dd581..76fc04f 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -30,6 +30,8 @@
</style>
<style name="SetupWizardTheme" parent="SuwThemeMaterial">
+ <!-- For all Alert Dialogs -->
+ <item name="android:alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
<item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
<item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
@@ -50,6 +52,8 @@
</style>
<style name="SetupWizardTheme.Light" parent="SuwThemeMaterial.Light">
+ <!-- For all Alert Dialogs -->
+ <item name="android:alertDialogTheme">@style/ThemeOverlay.AlertDialog</item>
<item name="android:listPreferredItemPaddingEnd">@dimen/suw_layout_margin_sides</item>
<item name="android:listPreferredItemPaddingStart">@dimen/suw_layout_margin_sides</item>
<item name="android:windowBackground">?android:attr/colorBackground</item>
@@ -160,6 +164,10 @@
<item name="preferenceBackgroundColor">@drawable/preference_background</item>
</style>
+ <style name="ThemeOverlay.AlertDialog" parent="@android:style/ThemeOverlay.Material.Dialog.Alert">
+ <item name="android:windowSoftInputMode">adjustResize</item>
+ </style>
+
<style name="Theme.AlertDialog" parent="@*android:style/Theme.Material.Settings.Dialog.Alert">
<item name="android:windowSoftInputMode">adjustResize</item>