summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurice Lam <yukl@google.com>2015-03-23 20:55:07 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-23 20:55:07 +0000
commit51910e44cdf8b4bf8c7035dada7828d9b24c4e35 (patch)
tree16c0ce3a77f581a5a34eb9340f18b1a4a32f2979
parent2e007deb9c3fce7f05cab6d40555daf7283eeafe (diff)
parentcbce1423d80d54d13f64bb718d9d42c6abbf2a05 (diff)
downloadandroid_frameworks_opt_setupwizard-51910e44cdf8b4bf8c7035dada7828d9b24c4e35.tar.gz
android_frameworks_opt_setupwizard-51910e44cdf8b4bf8c7035dada7828d9b24c4e35.tar.bz2
android_frameworks_opt_setupwizard-51910e44cdf8b4bf8c7035dada7828d9b24c4e35.zip
am cbce1423: Merge "[SetupWizardLib] Use AppCompat themes for icsCompat" into ub-setupwizard-alatar
* commit 'cbce1423d80d54d13f64bb718d9d42c6abbf2a05': [SetupWizardLib] Use AppCompat themes for icsCompat
-rw-r--r--library/Android.mk7
-rw-r--r--library/build.gradle4
-rw-r--r--library/common.mk4
-rw-r--r--library/main/res/values-v21/styles.xml28
-rw-r--r--library/platform/res/values-v21/styles.xml53
5 files changed, 65 insertions, 31 deletions
diff --git a/library/Android.mk b/library/Android.mk
index cd5462c..889f8d1 100644
--- a/library/Android.mk
+++ b/library/Android.mk
@@ -1,10 +1,13 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_SDK_VERSION := current
+LOCAL_AAPT_FLAGS := --auto-add-overlay
LOCAL_MANIFEST_FILE := main/AndroidManifest.xml
LOCAL_MODULE := setup-wizard-lib
-LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/main/res
+LOCAL_RESOURCE_DIR := \
+ $(LOCAL_PATH)/main/res \
+ $(LOCAL_PATH)/platform/res
+LOCAL_SDK_VERSION := current
LOCAL_SRC_FILES := $(call all-java-files-under, main/src)
include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/library/build.gradle b/library/build.gradle
index 1076110..7365a0c 100644
--- a/library/build.gradle
+++ b/library/build.gradle
@@ -28,6 +28,10 @@ android {
}
}
+ platform {
+ res.srcDirs = ['platform/res']
+ }
+
icsCompat {
res.srcDirs = ['ics/res']
}
diff --git a/library/common.mk b/library/common.mk
index fcf0ae2..05e4da1 100644
--- a/library/common.mk
+++ b/library/common.mk
@@ -12,6 +12,8 @@
# include frameworks/opt/setupwizard/library/common.mk
#
-LOCAL_RESOURCE_DIR += $(call my-dir)/main/res
+LOCAL_RESOURCE_DIR += \
+ $(call my-dir)/main/res \
+ $(call my-dir)/platform/res
LOCAL_AAPT_FLAGS += --auto-add-overlay --extra-packages com.android.setupwizardlib
LOCAL_STATIC_JAVA_LIBRARIES += setup-wizard-lib
diff --git a/library/main/res/values-v21/styles.xml b/library/main/res/values-v21/styles.xml
index 2bbbad2..c69e8e7 100644
--- a/library/main/res/values-v21/styles.xml
+++ b/library/main/res/values-v21/styles.xml
@@ -17,34 +17,6 @@
<resources>
- <!-- General styles -->
-
- <style name="SuwThemeMaterial" parent="android:Theme.Material.NoActionBar">
- <item name="android:colorAccent">@color/suw_color_accent_dark</item>
- <item name="android:navigationBarColor">@android:color/black</item>
- <item name="android:statusBarColor">@android:color/black</item>
- <item name="android:textColorLink">@color/suw_link_color_dark</item>
- <item name="android:textColorSecondary">@color/suw_color_secondary_dark</item>
- <item name="android:windowAnimationStyle">@style/Animation.SuwWindowAnimation</item>
- <item name="android:windowSoftInputMode">adjustPan</item>
-
- <item name="suwCardBackground">@drawable/suw_card_bg</item>
- <item name="suwNavBarTheme">@style/SuwNavBarThemeDark</item>
- </style>
-
- <style name="SuwThemeMaterial.Light" parent="android:Theme.Material.Light.NoActionBar">
- <item name="android:colorAccent">@color/suw_color_accent_light</item>
- <item name="android:navigationBarColor">@android:color/black</item>
- <item name="android:statusBarColor">@android:color/black</item>
- <item name="android:textColorLink">@color/suw_link_color_light</item>
- <item name="android:textColorSecondary">@color/suw_color_secondary_light</item>
- <item name="android:windowAnimationStyle">@style/Animation.SuwWindowAnimation</item>
- <item name="android:windowSoftInputMode">adjustPan</item>
-
- <item name="suwCardBackground">@drawable/suw_card_bg</item>
- <item name="suwNavBarTheme">@style/SuwNavBarThemeLight</item>
- </style>
-
<!-- Content styles -->
<style name="SuwDescription">
diff --git a/library/platform/res/values-v21/styles.xml b/library/platform/res/values-v21/styles.xml
new file mode 100644
index 0000000..a189305
--- /dev/null
+++ b/library/platform/res/values-v21/styles.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2015 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.
+-->
+
+<!-- These styles are only included in the platform build, to make sure that they do not
+ override the corresponding styles in the compatibility build. -->
+<resources>
+
+ <!-- General styles -->
+
+ <!-- These themes should only be used in platform builds because support libraries'
+ FragmentActivity and ActionBarActivity expects the activity theme to inherit from
+ Theme.AppCompat. -->
+ <style name="SuwThemeMaterial" parent="android:Theme.Material.NoActionBar">
+ <item name="android:colorAccent">@color/suw_color_accent_dark</item>
+ <item name="android:navigationBarColor">@android:color/black</item>
+ <item name="android:statusBarColor">@android:color/black</item>
+ <item name="android:textColorLink">@color/suw_link_color_dark</item>
+ <item name="android:textColorSecondary">@color/suw_color_secondary_dark</item>
+ <item name="android:windowAnimationStyle">@style/Animation.SuwWindowAnimation</item>
+ <item name="android:windowSoftInputMode">adjustPan</item>
+
+ <item name="suwCardBackground">@drawable/suw_card_bg</item>
+ <item name="suwNavBarTheme">@style/SuwNavBarThemeDark</item>
+ </style>
+
+ <style name="SuwThemeMaterial.Light" parent="android:Theme.Material.Light.NoActionBar">
+ <item name="android:colorAccent">@color/suw_color_accent_light</item>
+ <item name="android:navigationBarColor">@android:color/black</item>
+ <item name="android:statusBarColor">@android:color/black</item>
+ <item name="android:textColorLink">@color/suw_link_color_light</item>
+ <item name="android:textColorSecondary">@color/suw_color_secondary_light</item>
+ <item name="android:windowAnimationStyle">@style/Animation.SuwWindowAnimation</item>
+ <item name="android:windowSoftInputMode">adjustPan</item>
+
+ <item name="suwCardBackground">@drawable/suw_card_bg</item>
+ <item name="suwNavBarTheme">@style/SuwNavBarThemeLight</item>
+ </style>
+
+</resources>