summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2015-02-05 15:46:49 -0800
committerTyler Gunn <tgunn@google.com>2015-02-05 15:46:49 -0800
commit9f18fc16708deb125c1c7b0ff4ae6f6b248b2166 (patch)
treee147bc295ad06e2124d4bd5ee1ad6edf0934bd5d /res
parent8c01471f7e173d2fea84b047087289943193b531 (diff)
Adding disabled colors for settings.
This mimics what we've had to do in Telephony settings. Bug: 19237764 Change-Id: I78c7d2b3901f29a12c606aa823cd9abfb0db106a
Diffstat (limited to 'res')
-rw-r--r--res/color/settings_text_color_primary.xml23
-rw-r--r--res/color/settings_text_color_secondary.xml23
-rw-r--r--res/values/colors.xml1
-rw-r--r--res/values/styles.xml4
4 files changed, 49 insertions, 2 deletions
diff --git a/res/color/settings_text_color_primary.xml b/res/color/settings_text_color_primary.xml
new file mode 100644
index 000000000..862d8a2c3
--- /dev/null
+++ b/res/color/settings_text_color_primary.xml
@@ -0,0 +1,23 @@
+<?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.
+ */
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/setting_disabled_color" />
+ <item android:color="@color/setting_primary_color" />
+</selector>
diff --git a/res/color/settings_text_color_secondary.xml b/res/color/settings_text_color_secondary.xml
new file mode 100644
index 000000000..0b00e4688
--- /dev/null
+++ b/res/color/settings_text_color_secondary.xml
@@ -0,0 +1,23 @@
+<?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.
+ */
+-->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_enabled="false" android:color="@color/setting_disabled_color" />
+ <item android:color="@color/setting_secondary_color" />
+</selector>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 6e44f8b44..cd3a804f0 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -26,6 +26,7 @@
<color name="setting_primary_color">@color/dialtacts_primary_text_color</color>
<!-- Color for the setting description text. -->
<color name="setting_secondary_color">@color/dialtacts_secondary_text_color</color>
+ <color name="setting_disabled_color">#aaaaaa</color>
<color name="setting_background_color">#ffffff</color>
<color name="setting_button_color">#eee</color>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 82df4ec0f..8bd5f9d8e 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -166,9 +166,9 @@
<!-- Style applied to the "Settings" screen. Keep in sync with SettingsLight in Telephony. -->
<style name="SettingsStyle" parent="DialtactsThemeWithoutActionBarOverlay">
<!-- Setting text. -->
- <item name="android:textColor">@color/setting_primary_color</item>
+ <item name="android:textColorPrimary">@color/settings_text_color_primary</item>
<!-- Setting description. -->
- <item name="android:textColorSecondary">@color/setting_secondary_color</item>
+ <item name="android:textColorSecondary">@color/settings_text_color_secondary</item>
<item name="android:windowBackground">@color/setting_background_color</item>
<item name="android:colorAccent">@color/dialtacts_theme_color</item>
<item name="android:textColorLink">@color/dialtacts_theme_color</item>