summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-03-11 21:24:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-03-11 21:24:46 +0000
commitcd3c33e6bca1c6d431275074fa1671ac811a6e88 (patch)
tree3198416aa008a160d4122617c829e296a717a3fc
parent1130363f18bed5206e3184c2d0c0a368d8268c66 (diff)
parentc0653dad13c5c886a7fad0e9c2fe33aa264b1686 (diff)
downloadframeworks_base-cd3c33e6bca1c6d431275074fa1671ac811a6e88.zip
frameworks_base-cd3c33e6bca1c6d431275074fa1671ac811a6e88.tar.gz
frameworks_base-cd3c33e6bca1c6d431275074fa1671ac811a6e88.tar.bz2
Merge "Fix dialog overlay theme background color, add theme attr"
-rw-r--r--api/current.txt1
-rw-r--r--api/system-current.txt1
-rw-r--r--core/res/res/values/attrs.xml4
-rw-r--r--core/res/res/values/public.xml8
-rw-r--r--core/res/res/values/themes.xml1
-rw-r--r--core/res/res/values/themes_holo.xml2
-rw-r--r--core/res/res/values/themes_material.xml9
7 files changed, 16 insertions, 10 deletions
diff --git a/api/current.txt b/api/current.txt
index c1c6dc8..c43307e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -413,6 +413,7 @@ package android {
field public static final int colorActivatedHighlight = 16843664; // 0x1010390
field public static final int colorBackground = 16842801; // 0x1010031
field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
+ field public static final int colorBackgroundFloating = 16844007; // 0x10104e7
field public static final int colorButtonNormal = 16843819; // 0x101042b
field public static final int colorControlActivated = 16843818; // 0x101042a
field public static final int colorControlHighlight = 16843820; // 0x101042c
diff --git a/api/system-current.txt b/api/system-current.txt
index e94a3cf..6acea9e 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -485,6 +485,7 @@ package android {
field public static final int colorActivatedHighlight = 16843664; // 0x1010390
field public static final int colorBackground = 16842801; // 0x1010031
field public static final int colorBackgroundCacheHint = 16843435; // 0x10102ab
+ field public static final int colorBackgroundFloating = 16844007; // 0x10104e7
field public static final int colorButtonNormal = 16843819; // 0x101042b
field public static final int colorControlActivated = 16843818; // 0x101042a
field public static final int colorControlHighlight = 16843820; // 0x101042c
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 30ce271..15797dd 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -31,8 +31,10 @@
<attr name="colorForeground" format="color" />
<!-- Default color of foreground imagery on an inverted background. -->
<attr name="colorForegroundInverse" format="color" />
- <!-- Color that matches (as closely as possible) the window background. -->
+ <!-- Default color of background imagery, ex. full-screen windows. -->
<attr name="colorBackground" format="color" />
+ <!-- Default color of background imagery for floating components, ex. dialogs, popups, and cards. -->
+ <attr name="colorBackgroundFloating" format="color" />
<!-- This is a hint for a solid color that can be used for caching
rendered views. This should be the color of the background when
there is a solid background color; it should be null when the
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 16f0676..da911b2 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2642,15 +2642,11 @@
<public type="style" name="Theme.Material.Light.LightStatusBar" />
<public type="style" name="ThemeOverlay.Material.Dialog" />
- <!-- Context menu ID for the "Paste as plain text" menu item to to copy the current contents
- of the clipboard into the text view without formatting. -->
<public type="id" name="pasteAsPlainText" />
- <!-- Context menu ID for the "Undo" menu item to undo the last text edit operation. -->
<public type="id" name="undo" />
- <!-- Context menu ID for the "Redo" menu item to redo the last text edit operation. -->
<public type="id" name="redo" />
-
- <!-- TextView attribute to control undo behavior. -->
<public type="attr" name="allowUndo" />
+ <public type="attr" name="colorBackgroundFloating" />
+
</resources>
diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml
index 4ba6c0b..9e87b4d 100644
--- a/core/res/res/values/themes.xml
+++ b/core/res/res/values/themes.xml
@@ -45,6 +45,7 @@ please see themes_device_defaults.xml.
<item name="colorForeground">@color/bright_foreground_dark</item>
<item name="colorForegroundInverse">@color/bright_foreground_dark_inverse</item>
<item name="colorBackground">@color/background_dark</item>
+ <item name="colorBackgroundFloating">?attr/colorBackground</item>
<item name="colorBackgroundCacheHint">?attr/colorBackground</item>
<item name="colorPressedHighlight">@color/legacy_pressed_highlight</item>
diff --git a/core/res/res/values/themes_holo.xml b/core/res/res/values/themes_holo.xml
index c30b3d5..701d0ef 100644
--- a/core/res/res/values/themes_holo.xml
+++ b/core/res/res/values/themes_holo.xml
@@ -65,6 +65,7 @@ please see themes_device_defaults.xml.
<item name="colorForeground">@color/bright_foreground_holo_dark</item>
<item name="colorForegroundInverse">@color/bright_foreground_inverse_holo_dark</item>
<item name="colorBackground">@color/background_holo_dark</item>
+ <item name="colorBackgroundFloating">@color/background_holo_dark</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_holo_dark</item>
<item name="disabledAlpha">0.5</item>
<item name="backgroundDimAmount">0.6</item>
@@ -404,6 +405,7 @@ please see themes_device_defaults.xml.
<item name="colorForeground">@color/bright_foreground_holo_light</item>
<item name="colorForegroundInverse">@color/bright_foreground_inverse_holo_light</item>
<item name="colorBackground">@color/background_holo_light</item>
+ <item name="colorBackgroundFloating">@color/background_holo_light</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_holo_light</item>
<item name="disabledAlpha">0.5</item>
<item name="backgroundDimAmount">0.6</item>
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index a610d07..38cfecd 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -45,6 +45,7 @@ please see themes_device_defaults.xml.
<item name="colorForeground">@color/foreground_material_dark</item>
<item name="colorForegroundInverse">@color/foreground_material_light</item>
<item name="colorBackground">@color/background_material_dark</item>
+ <item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
<item name="disabledAlpha">@dimen/disabled_alpha_material_dark</item>
<item name="backgroundDimAmount">0.6</item>
@@ -398,6 +399,7 @@ please see themes_device_defaults.xml.
<item name="colorForeground">@color/foreground_material_light</item>
<item name="colorForegroundInverse">@color/foreground_material_dark</item>
<item name="colorBackground">@color/background_material_light</item>
+ <item name="colorBackgroundFloating">@color/background_floating_material_light</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
<item name="disabledAlpha">@dimen/disabled_alpha_material_light</item>
<item name="backgroundDimAmount">0.6</item>
@@ -770,6 +772,7 @@ please see themes_device_defaults.xml.
<item name="colorForeground">@color/foreground_material_light</item>
<item name="colorForegroundInverse">@color/foreground_material_dark</item>
<item name="colorBackground">@color/background_material_light</item>
+ <item name="colorBackgroundFloating">@color/background_floating_material_light</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_light</item>
<item name="textColorPrimary">@color/primary_text_material_light</item>
@@ -806,6 +809,7 @@ please see themes_device_defaults.xml.
<item name="colorForeground">@color/foreground_material_dark</item>
<item name="colorForegroundInverse">@color/foreground_material_light</item>
<item name="colorBackground">@color/background_material_dark</item>
+ <item name="colorBackgroundFloating">@color/background_floating_material_dark</item>
<item name="colorBackgroundCacheHint">@color/background_cache_hint_selector_material_dark</item>
<item name="textColorPrimary">@color/primary_text_material_dark</item>
@@ -852,7 +856,6 @@ please see themes_device_defaults.xml.
<!-- Theme overlay that overrides window properties to display as a dialog. -->
<style name="ThemeOverlay.Material.Dialog">
- <item name="colorBackground">@color/background_floating_material_light</item>
<item name="colorBackgroundCacheHint">@null</item>
<item name="windowFrame">@null</item>
@@ -1044,7 +1047,7 @@ please see themes_device_defaults.xml.
<eat-comment />
<style name="Theme.Material.BaseDialog">
- <item name="colorBackground">@color/background_floating_material_dark</item>
+ <item name="colorBackground">?attr/colorBackgroundFloating</item>
<item name="windowFrame">@null</item>
<item name="windowTitleStyle">@style/DialogWindowTitle.Material</item>
@@ -1155,7 +1158,7 @@ please see themes_device_defaults.xml.
<!-- Light material dialog themes -->
<style name="Theme.Material.Light.BaseDialog">
- <item name="colorBackground">@color/background_floating_material_light</item>
+ <item name="colorBackground">?attr/colorBackgroundFloating</item>
<item name="windowFrame">@null</item>
<item name="windowTitleStyle">@style/DialogWindowTitle.Material.Light</item>