Use Settings app's theme for L and later
This CL must be checked in together with I506b9ae6ea.
Bug: 11866784
Change-Id: I00aa90618642758c783f7c92f162dc2ee16659a6
diff --git a/java/Android.mk b/java/Android.mk
index b580624..0a7b21f 100644
--- a/java/Android.mk
+++ b/java/Android.mk
@@ -33,6 +33,10 @@
# Include all the resources regardless of system supported locales
LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true
+# TODO: Remove res-lxx reference once L-release becomes public.
+res_dirs := res res-lxx
+LOCAL_RESOURCE_DIR := $(addprefix $(LOCAL_PATH)/, $(res_dirs))
+
LOCAL_SDK_VERSION := current
LOCAL_PROGUARD_FLAG_FILES := proguard.flags
diff --git a/java/AndroidManifest.xml b/java/AndroidManifest.xml
index 6f4e602..5d8ef43 100644
--- a/java/AndroidManifest.xml
+++ b/java/AndroidManifest.xml
@@ -86,7 +86,7 @@
</receiver>
<activity android:name=".settings.SettingsActivity"
- android:theme="@style/platformActivityTheme"
+ android:theme="@style/platformSettingsTheme"
android:label="@string/english_ime_settings"
android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
@@ -95,7 +95,7 @@
</activity>
<activity android:name=".spellcheck.SpellCheckerSettingsActivity"
- android:theme="@style/platformActivityTheme"
+ android:theme="@style/platformSettingsTheme"
android:label="@string/android_spell_checker_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -103,7 +103,7 @@
</activity>
<activity android:name=".settings.DebugSettingsActivity"
- android:theme="@style/platformActivityTheme"
+ android:theme="@style/platformSettingsTheme"
android:label="@string/english_ime_debug_settings">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -150,7 +150,7 @@
</receiver>
<activity android:name="com.android.inputmethod.dictionarypack.DictionarySettingsActivity"
- android:theme="@style/platformActivityTheme"
+ android:theme="@style/platformSettingsTheme"
android:label="@string/dictionary_settings_title"
android:uiOptions="splitActionBarWhenNarrow">
<intent-filter>
diff --git a/java/res-lxx/values-v21/platform-theme.xml b/java/res-lxx/values-v21/platform-theme.xml
new file mode 100644
index 0000000..a49e364
--- /dev/null
+++ b/java/res-lxx/values-v21/platform-theme.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright 2014, 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 xmlns:android="http://schemas.android.com/apk/res/android">
+ <style name="platformActivityTheme" parent="@android:style/Theme.Material.Light" />
+ <!-- From packages/apps/Settings -->
+ <style name="platformSettingsTheme" parent="@android:style/Theme.Material.Settings">
+ <item name="android:actionBarStyle">@android:style/Widget.Material.Light.ActionBar.Solid</item>
+ <item name="android:alertDialogTheme">@style/Theme.AlertDialog</item>
+ </style>
+ <!-- From packages/apps/Settings -->
+ <style name="Theme.AlertDialog" parent="@*android:style/Theme.Material.Light.Dialog.Alert">
+ <!-- Used by the ActionBar: @color/theme_primary -->
+ <item name="android:colorPrimary">#ff263238</item>
+ <!-- Used by the StatusBar: @color/theme_primary_dark -->
+ <item name="android:colorPrimaryDark">#ff21272b</item>
+ <!-- Used by controls, e.g. CheckBox, ProgressBar, etc.: @color/theme_accent -->
+ <item name="android:colorAccent">#ff009688</item>
+ </style>
+ <style name="platformDialogTheme" parent="@android:style/Theme.Material.Light.Dialog" />
+</resources>
diff --git a/java/res/values-v20/platform-theme.xml b/java/res/values-v20/platform-theme.xml
deleted file mode 100644
index 52e7f35..0000000
--- a/java/res/values-v20/platform-theme.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2014, 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.
-*/
--->
-
-<!-- TODO: This file is temporarily placed under values-v20. -->
-<!-- TODO: It might be moved under values-v21. -->
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
- <style name="platformActivityTheme" parent="@android:style/Theme.Material.Light" />
- <style name="platformDialogTheme" parent="@android:style/Theme.Material.Light.Dialog" />
-</resources>
diff --git a/java/res/values/platform-theme.xml b/java/res/values/platform-theme.xml
index 8e131a2..e688597 100644
--- a/java/res/values/platform-theme.xml
+++ b/java/res/values/platform-theme.xml
@@ -20,5 +20,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="platformActivityTheme" parent="@android:style/Theme.Holo" />
+ <style name="platformSettingsTheme" parent="@android:style/Theme.Holo" />
<style name="platformDialogTheme" parent="@android:style/Theme.Holo.Dialog" />
</resources>