diff options
| -rw-r--r-- | core/res/res/color/primary_text_activated_material_dark.xml | 21 | ||||
| -rw-r--r-- | core/res/res/color/primary_text_activated_material_light.xml | 21 | ||||
| -rw-r--r-- | core/res/res/color/secondary_text_activated_material_dark.xml | 21 | ||||
| -rw-r--r-- | core/res/res/color/secondary_text_activated_material_light.xml | 21 | ||||
| -rw-r--r-- | core/res/res/layout/preference_header_item_material.xml | 2 | ||||
| -rw-r--r-- | core/res/res/values/attrs.xml | 5 | ||||
| -rw-r--r-- | core/res/res/values/themes.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values/themes_holo.xml | 4 | ||||
| -rw-r--r-- | core/res/res/values/themes_material.xml | 8 |
9 files changed, 107 insertions, 0 deletions
diff --git a/core/res/res/color/primary_text_activated_material_dark.xml b/core/res/res/color/primary_text_activated_material_dark.xml new file mode 100644 index 000000000000..f1b742ac4834 --- /dev/null +++ b/core/res/res/color/primary_text_activated_material_dark.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_activated="true" + android:color="@color/primary_text_default_material_light"/> + <item android:color="@color/primary_text_default_material_dark"/> +</selector> diff --git a/core/res/res/color/primary_text_activated_material_light.xml b/core/res/res/color/primary_text_activated_material_light.xml new file mode 100644 index 000000000000..d92da631c937 --- /dev/null +++ b/core/res/res/color/primary_text_activated_material_light.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_activated="true" + android:color="@color/primary_text_default_material_dark"/> + <item android:color="@color/primary_text_default_material_light"/> +</selector> diff --git a/core/res/res/color/secondary_text_activated_material_dark.xml b/core/res/res/color/secondary_text_activated_material_dark.xml new file mode 100644 index 000000000000..7a8428a03d8a --- /dev/null +++ b/core/res/res/color/secondary_text_activated_material_dark.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_activated="true" + android:color="@color/secondary_text_default_material_light"/> + <item android:color="@color/secondary_text_default_material_dark"/> +</selector> diff --git a/core/res/res/color/secondary_text_activated_material_light.xml b/core/res/res/color/secondary_text_activated_material_light.xml new file mode 100644 index 000000000000..36ff408a79ac --- /dev/null +++ b/core/res/res/color/secondary_text_activated_material_light.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 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. +--> + +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_activated="true" + android:color="@color/secondary_text_default_material_dark"/> + <item android:color="@color/secondary_text_default_material_light"/> +</selector> diff --git a/core/res/res/layout/preference_header_item_material.xml b/core/res/res/layout/preference_header_item_material.xml index 88e1cb2b224f..ffb18ae4a874 100644 --- a/core/res/res/layout/preference_header_item_material.xml +++ b/core/res/res/layout/preference_header_item_material.xml @@ -46,6 +46,7 @@ android:layout_height="wrap_content" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceListItem" + android:textColor="?android:attr/textColorPrimaryActivated" android:ellipsize="marquee" android:fadingEdge="horizontal" /> @@ -55,6 +56,7 @@ android:layout_below="@android:id/title" android:layout_alignStart="@android:id/title" android:textAppearance="?android:attr/textAppearanceListItemSecondary" + android:textColor="?android:attr/textColorSecondaryActivated" android:ellipsize="end" android:maxLines="2" /> diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml index 8ea181407c25..256d90378746 100644 --- a/core/res/res/values/attrs.xml +++ b/core/res/res/values/attrs.xml @@ -110,6 +110,11 @@ <!-- Dim inverse text color. This does not differentiate the disabled state. --> <attr name="textColorSecondaryInverseNoDisable" format="reference|color" /> + <!-- Bright text color for use over activated backgrounds. --> + <attr name="textColorPrimaryActivated" format="reference|color" /> + <!-- Dim text color for use over activated backgrounds. --> + <attr name="textColorSecondaryActivated" format="reference|color" /> + <!-- Text color for urls in search suggestions, used by things like global search and the browser. @hide --> <attr name="textColorSearchUrl" format="reference|color" /> diff --git a/core/res/res/values/themes.xml b/core/res/res/values/themes.xml index 7a9e1d59924c..d983440b99ce 100644 --- a/core/res/res/values/themes.xml +++ b/core/res/res/values/themes.xml @@ -74,6 +74,8 @@ please see themes_device_defaults.xml. <item name="textColorPrimaryInverse">@color/primary_text_light</item> <item name="textColorSecondaryInverse">@color/secondary_text_light</item> <item name="textColorTertiaryInverse">@color/tertiary_text_light</item> + <item name="textColorPrimaryActivated">@color/primary_text_dark</item> + <item name="textColorSecondaryActivated">@color/secondary_text_dark</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_dark_disable_only</item> <item name="textColorPrimaryInverseDisableOnly">@color/primary_text_light_disable_only</item> <item name="textColorPrimaryNoDisable">@color/primary_text_dark_nodisable</item> @@ -478,6 +480,8 @@ please see themes_device_defaults.xml. <item name="textColorPrimaryInverse">@color/primary_text_dark</item> <item name="textColorSecondaryInverse">@color/secondary_text_dark</item> <item name="textColorTertiaryInverse">@color/tertiary_text_dark</item> + <item name="textColorPrimaryActivated">@color/primary_text_light</item> + <item name="textColorSecondaryActivated">@color/secondary_text_light</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_light_disable_only</item> <item name="textColorPrimaryInverseDisableOnly">@color/primary_text_dark_disable_only</item> <item name="textColorPrimaryNoDisable">@color/primary_text_light_nodisable</item> diff --git a/core/res/res/values/themes_holo.xml b/core/res/res/values/themes_holo.xml index 9c1d0f38faf9..c30b3d5f60e0 100644 --- a/core/res/res/values/themes_holo.xml +++ b/core/res/res/values/themes_holo.xml @@ -93,6 +93,8 @@ please see themes_device_defaults.xml. <item name="textColorPrimaryInverse">@color/primary_text_holo_light</item> <item name="textColorSecondaryInverse">@color/secondary_text_holo_light</item> <item name="textColorTertiaryInverse">@color/tertiary_text_holo_light</item> + <item name="textColorPrimaryActivated">@color/primary_text_holo_dark</item> + <item name="textColorSecondaryActivated">@color/secondary_text_holo_dark</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_disable_only_holo_dark</item> <item name="textColorPrimaryInverseDisableOnly">@color/primary_text_disable_only_holo_light</item> <item name="textColorPrimaryNoDisable">@color/primary_text_nodisable_holo_dark</item> @@ -429,6 +431,8 @@ please see themes_device_defaults.xml. <item name="textColorPrimaryInverse">@color/primary_text_holo_dark</item> <item name="textColorSecondaryInverse">@color/secondary_text_holo_dark</item> <item name="textColorTertiaryInverse">@color/tertiary_text_holo_dark</item> + <item name="textColorPrimaryActivated">@color/primary_text_holo_light</item> + <item name="textColorSecondaryActivated">@color/secondary_text_holo_light</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_disable_only_holo_light</item> <item name="textColorPrimaryInverseDisableOnly">@color/primary_text_disable_only_holo_dark</item> <item name="textColorPrimaryNoDisable">@color/primary_text_nodisable_holo_light</item> diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml index 64201537c0a2..b51974ec20dc 100644 --- a/core/res/res/values/themes_material.xml +++ b/core/res/res/values/themes_material.xml @@ -55,9 +55,11 @@ please see themes_device_defaults.xml. <item name="textColorPrimary">@color/primary_text_material_dark</item> <item name="textColorPrimaryInverse">@color/primary_text_material_light</item> + <item name="textColorPrimaryActivated">@color/primary_text_activated_material_dark</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_disable_only_material_dark</item> <item name="textColorSecondary">@color/secondary_text_material_dark</item> <item name="textColorSecondaryInverse">@color/secondary_text_material_light</item> + <item name="textColorSecondaryActivated">@color/secondary_text_activated_material_dark</item> <item name="textColorTertiary">@color/secondary_text_material_dark</item> <item name="textColorTertiaryInverse">@color/secondary_text_material_light</item> <item name="textColorHint">@color/hint_foreground_material_dark</item> @@ -402,8 +404,10 @@ please see themes_device_defaults.xml. <item name="textColorPrimary">@color/primary_text_material_light</item> <item name="textColorPrimaryInverse">@color/primary_text_material_dark</item> + <item name="textColorPrimaryActivated">@color/primary_text_activated_material_light</item> <item name="textColorSecondary">@color/secondary_text_material_light</item> <item name="textColorSecondaryInverse">@color/secondary_text_material_dark</item> + <item name="textColorSecondaryActivated">@color/secondary_text_activated_material_light</item> <item name="textColorTertiary">@color/secondary_text_material_light</item> <item name="textColorTertiaryInverse">@color/secondary_text_material_dark</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_disable_only_material_light</item> @@ -757,8 +761,10 @@ please see themes_device_defaults.xml. <item name="textColorPrimary">@color/primary_text_material_light</item> <item name="textColorPrimaryInverse">@color/primary_text_material_dark</item> + <item name="textColorPrimaryActivated">@color/primary_text_activated_material_light</item> <item name="textColorSecondary">@color/secondary_text_material_light</item> <item name="textColorSecondaryInverse">@color/secondary_text_material_dark</item> + <item name="textColorSecondaryActivated">@color/secondary_text_activated_material_light</item> <item name="textColorTertiary">@color/secondary_text_material_light</item> <item name="textColorTertiaryInverse">@color/secondary_text_material_dark</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_disable_only_material_light</item> @@ -794,9 +800,11 @@ please see themes_device_defaults.xml. <item name="textColorPrimary">@color/primary_text_material_dark</item> <item name="textColorPrimaryInverse">@color/primary_text_material_light</item> + <item name="textColorPrimaryActivated">@color/primary_text_activated_material_dark</item> <item name="textColorPrimaryDisableOnly">@color/primary_text_disable_only_material_dark</item> <item name="textColorSecondary">@color/secondary_text_material_dark</item> <item name="textColorSecondaryInverse">@color/secondary_text_material_light</item> + <item name="textColorSecondaryActivated">@color/secondary_text_activated_material_dark</item> <item name="textColorTertiary">@color/secondary_text_material_dark</item> <item name="textColorTertiaryInverse">@color/secondary_text_material_light</item> <item name="textColorHint">@color/hint_foreground_material_dark</item> |