summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/theme/base
diff options
context:
space:
mode:
authorEric Erfanian <erfanian@google.com>2018-05-30 16:17:27 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-05-30 16:17:27 +0000
commit2c3d81eeac82472d06027bc65d661e16735c8608 (patch)
tree293aeb0012d8db8f3f4606a75a422cf4da328477 /java/com/android/dialer/theme/base
parent4efd0ebf003e985e7cbe40d8ffd9f7ff227a9611 (diff)
parent152c3fd58f83a1882bcdc8bc55f46bbb8f3173c9 (diff)
Merge changes Ica13ee39,I5e0fedc8,I8e7efad0,I0ecc1f91,Iee1e658a, ...
* changes: Drop maps.impl from packages.mk Check if ID column is null before retrieving data from the smart dial database. Rename theme/private to theme/hidden. Some improvements to the answer fragment layouts. Better a11y for the bottom sheet. Fix a few UI bugs. Log IMS video call available state Better a11y for contact badge in the new call log. Use lookup key to determine the letter tile color Use Dialer Light Theme for SpeakEasyFragment Better a11y for new call log entries. Use Maps SDK lite mode instead of static API for emergency call. Updating locations where PrimaryInfo#setPhoto is used to also PrimaryInfo#setPhotoUri for new GlidePhotoManager implementation. As part of this addition, we also are cleaning the setPhoto(null) because this is not explicitly needed. Converted ThemeUtil into a DaggerModule. Delete AppCompatConstants Remove photo support in PhoneNumberService Began implementation of Dialer dark theme.
Diffstat (limited to 'java/com/android/dialer/theme/base')
-rw-r--r--java/com/android/dialer/theme/base/AndroidManifest.xml16
-rw-r--r--java/com/android/dialer/theme/base/Theme.java76
-rw-r--r--java/com/android/dialer/theme/base/ThemeComponent.java40
-rw-r--r--java/com/android/dialer/theme/base/impl/AospThemeImpl.java175
-rw-r--r--java/com/android/dialer/theme/base/impl/AospThemeModule.java36
-rw-r--r--java/com/android/dialer/theme/base/res/values/attr.xml26
-rw-r--r--java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml53
-rw-r--r--java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml64
-rw-r--r--java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml81
9 files changed, 567 insertions, 0 deletions
diff --git a/java/com/android/dialer/theme/base/AndroidManifest.xml b/java/com/android/dialer/theme/base/AndroidManifest.xml
new file mode 100644
index 000000000..ff7891055
--- /dev/null
+++ b/java/com/android/dialer/theme/base/AndroidManifest.xml
@@ -0,0 +1,16 @@
+<!--
+ ~ Copyright (C) 2018 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
+ -->
+<manifest package="com.android.dialer.theme.base"/>
diff --git a/java/com/android/dialer/theme/base/Theme.java b/java/com/android/dialer/theme/base/Theme.java
new file mode 100644
index 000000000..6e0d20a7a
--- /dev/null
+++ b/java/com/android/dialer/theme/base/Theme.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2018 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
+ */
+
+package com.android.dialer.theme.base;
+
+import android.content.Context;
+import android.support.annotation.ColorInt;
+import android.support.annotation.IntDef;
+import android.support.annotation.StyleRes;
+import android.view.LayoutInflater;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/** Interface for theme. */
+public interface Theme {
+
+ /** IntDef for the different themes Dialer supports. */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef({UNKNOWN, LIGHT, DARK, LIGHT_M2})
+ @interface Type {}
+
+ int UNKNOWN = 0;
+ int LIGHT = 1;
+ int DARK = 2;
+ int LIGHT_M2 = 3;
+
+ @Type
+ int getTheme();
+
+ @StyleRes
+ int getApplicationThemeRes();
+
+ Context getThemedContext(Context context);
+
+ LayoutInflater getThemedLayoutInflator(LayoutInflater inflater);
+
+ @ColorInt
+ int getColorIcon();
+
+ @ColorInt
+ int getColorIconSecondary();
+
+ @ColorInt
+ int getColorPrimary();
+
+ @ColorInt
+ int getColorPrimaryDark();
+
+ @ColorInt
+ int getColorAccent();
+
+ @ColorInt
+ int getTextColorSecondary();
+
+ @ColorInt
+ int getTextColorPrimary();
+
+ @ColorInt
+ int getColorTextOnUnthemedDarkBackground();
+
+ @ColorInt
+ int getColorIconOnUnthemedDarkBackground();
+}
diff --git a/java/com/android/dialer/theme/base/ThemeComponent.java b/java/com/android/dialer/theme/base/ThemeComponent.java
new file mode 100644
index 000000000..d9067616f
--- /dev/null
+++ b/java/com/android/dialer/theme/base/ThemeComponent.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2018 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
+ */
+
+package com.android.dialer.theme.base;
+
+import android.content.Context;
+import com.android.dialer.inject.HasRootComponent;
+import com.android.dialer.inject.IncludeInDialerRoot;
+import dagger.Subcomponent;
+
+/** Component for Theme. */
+@Subcomponent
+public abstract class ThemeComponent {
+
+ public abstract Theme theme();
+
+ public static ThemeComponent get(Context context) {
+ return ((HasComponent) ((HasRootComponent) context.getApplicationContext()).component())
+ .themeComponent();
+ }
+
+ /** Used to refer to the root application component. */
+ @IncludeInDialerRoot
+ public interface HasComponent {
+ ThemeComponent themeComponent();
+ }
+}
diff --git a/java/com/android/dialer/theme/base/impl/AospThemeImpl.java b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java
new file mode 100644
index 000000000..b8c7e528f
--- /dev/null
+++ b/java/com/android/dialer/theme/base/impl/AospThemeImpl.java
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2018 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.
+ */
+
+package com.android.dialer.theme.base.impl;
+
+import android.content.Context;
+import android.content.res.TypedArray;
+import android.support.annotation.ColorInt;
+import android.support.annotation.StyleRes;
+import android.view.ContextThemeWrapper;
+import android.view.LayoutInflater;
+import com.android.dialer.common.Assert;
+import com.android.dialer.theme.base.R;
+import com.android.dialer.theme.base.Theme;
+import javax.inject.Singleton;
+
+/** Utility for fetching */
+@SuppressWarnings("unused")
+@Singleton
+public class AospThemeImpl implements Theme {
+
+ private int colorIcon = -1;
+ private int colorIconSecondary = -1;
+ private int colorPrimary = -1;
+ private int colorPrimaryDark = -1;
+ private int colorAccent = -1;
+ private int textColorPrimary = -1;
+ private int textColorSecondary = -1;
+ private int textColorPrimaryInverse = -1;
+ private int textColorHint = -1;
+ private int colorBackground = -1;
+ private int colorBackgroundFloating = -1;
+ private int colorTextOnUnthemedDarkBackground = -1;
+ private int colorIconOnUnthemedDarkBackground = -1;
+
+ public AospThemeImpl(Context context) {
+
+ context = context.getApplicationContext();
+ context.setTheme(getApplicationThemeRes());
+ TypedArray array =
+ context
+ .getTheme()
+ .obtainStyledAttributes(
+ getApplicationThemeRes(),
+ new int[] {
+ android.R.attr.colorPrimary,
+ android.R.attr.colorPrimaryDark,
+ android.R.attr.colorAccent,
+ android.R.attr.textColorPrimary,
+ android.R.attr.textColorSecondary,
+ android.R.attr.textColorPrimaryInverse,
+ android.R.attr.textColorHint,
+ android.R.attr.colorBackground,
+ android.R.attr.colorBackgroundFloating,
+ R.attr.colorIcon,
+ R.attr.colorIconSecondary,
+ R.attr.colorTextOnUnthemedDarkBackground,
+ R.attr.colorIconOnUnthemedDarkBackground,
+ });
+ colorPrimary = array.getColor(/* index= */ 0, /* defValue= */ -1);
+ colorPrimaryDark = array.getColor(/* index= */ 1, /* defValue= */ -1);
+ colorAccent = array.getColor(/* index= */ 2, /* defValue= */ -1);
+ textColorPrimary = array.getColor(/* index= */ 3, /* defValue= */ -1);
+ textColorSecondary = array.getColor(/* index= */ 4, /* defValue= */ -1);
+ textColorPrimaryInverse = array.getColor(/* index= */ 5, /* defValue= */ -1);
+ textColorHint = array.getColor(/* index= */ 6, /* defValue= */ -1);
+ colorBackground = array.getColor(/* index= */ 7, /* defValue= */ -1);
+ colorBackgroundFloating = array.getColor(/* index= */ 8, /* defValue= */ -1);
+ colorIcon = array.getColor(/* index= */ 9, /* defValue= */ -1);
+ colorIconSecondary = array.getColor(/* index= */ 10, /* defValue= */ -1);
+ colorTextOnUnthemedDarkBackground = array.getColor(/* index= */ 11, /* defValue= */ -1);
+ colorIconOnUnthemedDarkBackground = array.getColor(/* index= */ 12, /* defValue= */ -1);
+ array.recycle();
+ }
+
+ /**
+ * Returns the {@link Theme} that the application is using. Activities should check this value if
+ * their custom style needs to customize further based on the application theme.
+ */
+ @Override
+ public @Type int getTheme() {
+ // TODO(a bug): add share prefs check to configure this
+ return LIGHT;
+ }
+
+ @Override
+ public @StyleRes int getApplicationThemeRes() {
+ switch (getTheme()) {
+ case DARK:
+ return R.style.Dialer_Dark_ThemeBase_NoActionBar;
+ case LIGHT:
+ return R.style.Dialer_ThemeBase_NoActionBar;
+ case UNKNOWN:
+ default:
+ throw Assert.createIllegalStateFailException("Theme hasn't been set yet.");
+ }
+ }
+
+ @Override
+ public Context getThemedContext(Context context) {
+ return new ContextThemeWrapper(context, getApplicationThemeRes());
+ }
+
+ @Override
+ public LayoutInflater getThemedLayoutInflator(LayoutInflater inflater) {
+ return inflater.cloneInContext(getThemedContext(inflater.getContext()));
+ }
+
+ @Override
+ public @ColorInt int getColorIcon() {
+ Assert.checkArgument(colorIcon != -1);
+ return colorIcon;
+ }
+
+ @Override
+ public @ColorInt int getColorIconSecondary() {
+ Assert.checkArgument(colorIconSecondary != -1);
+ return colorIconSecondary;
+ }
+
+ @Override
+ public @ColorInt int getColorPrimary() {
+ Assert.checkArgument(colorPrimary != -1);
+ return colorPrimary;
+ }
+
+ @Override
+ public int getColorPrimaryDark() {
+ Assert.checkArgument(colorPrimary != -1);
+ return 0;
+ }
+
+ @Override
+ public @ColorInt int getColorAccent() {
+ Assert.checkArgument(colorAccent != -1);
+ return colorAccent;
+ }
+
+ @Override
+ public @ColorInt int getTextColorSecondary() {
+ Assert.checkArgument(textColorSecondary != -1);
+ return textColorSecondary;
+ }
+
+ @Override
+ public @ColorInt int getTextColorPrimary() {
+ Assert.checkArgument(textColorPrimary != -1);
+ return textColorPrimary;
+ }
+
+ @Override
+ public @ColorInt int getColorTextOnUnthemedDarkBackground() {
+ Assert.checkArgument(colorTextOnUnthemedDarkBackground != -1);
+ return colorTextOnUnthemedDarkBackground;
+ }
+
+ @Override
+ public @ColorInt int getColorIconOnUnthemedDarkBackground() {
+ Assert.checkArgument(colorIconOnUnthemedDarkBackground != -1);
+ return colorIconOnUnthemedDarkBackground;
+ }
+}
diff --git a/java/com/android/dialer/theme/base/impl/AospThemeModule.java b/java/com/android/dialer/theme/base/impl/AospThemeModule.java
new file mode 100644
index 000000000..7cf52cadd
--- /dev/null
+++ b/java/com/android/dialer/theme/base/impl/AospThemeModule.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2018 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
+ */
+
+package com.android.dialer.theme.base.impl;
+
+import android.content.Context;
+import com.android.dialer.inject.ApplicationContext;
+import com.android.dialer.inject.DialerVariant;
+import com.android.dialer.inject.InstallIn;
+import com.android.dialer.theme.base.Theme;
+import dagger.Module;
+import dagger.Provides;
+
+/** Module which binds {@link AospThemeImpl}. */
+@InstallIn(variants = {DialerVariant.DIALER_TEST})
+@Module
+public class AospThemeModule {
+
+ @Provides
+ static Theme provideThemeModule(@ApplicationContext Context context) {
+ return new AospThemeImpl(context);
+ }
+}
diff --git a/java/com/android/dialer/theme/base/res/values/attr.xml b/java/com/android/dialer/theme/base/res/values/attr.xml
new file mode 100644
index 000000000..41c6225ad
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/attr.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 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>
+ <!-- Used to style all icons in Dialer. -->
+ <attr name="colorIcon" format="color"/>
+ <!-- Used to style some icons a little lighter in Dialer. -->
+ <attr name="colorIconSecondary" format="color"/>
+ <!-- Used to color text on dark backgrounds. White in Light Theme. -->
+ <attr name="colorTextOnUnthemedDarkBackground" format="color"/>
+ <!-- Used to color icons on dark backgrounds. White in Light Theme. -->
+ <attr name="colorIconOnUnthemedDarkBackground" format="color"/>
+</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml
new file mode 100644
index 000000000..cfdee7801
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/styles_dialer_light.xml
@@ -0,0 +1,53 @@
+<!--
+ ~ Copyright (C) 2012 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>
+ <!-- TODO(a bug): properly document this or delete it -->
+ <!-- We don't want to style this, need to discuss with Yen why this was used instead of a default theme -->
+ <style name="Theme.PreCall.DialogHolder" parent="Dialer.ThemeBase.NoActionBar">
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:windowActivityTransitions">false</item>
+ <item name="android:windowIsTranslucent">true</item>
+
+ <item name="android:statusBarColor">@android:color/transparent</item>
+ <item name="android:navigationBarColor">@android:color/transparent</item>
+ <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+ </style>
+
+ <!-- Style applied to the "Settings" screen. Keep in sync with SettingsLight in Telephony. -->
+ <style name="SettingsStyle" parent="Dialer.ThemeBase.ActionBar">
+ <!-- Setting text. -->
+ <item name="android:textColorPrimary">@color/settings_text_color_primary</item>
+ <!-- Setting description. -->
+ <item name="android:textColorSecondary">@color/settings_text_color_secondary</item>
+ <item name="android:windowBackground">?android:attr/colorBackground</item>
+ <item name="android:colorAccent">?android:attr/colorPrimary</item>
+ <item name="android:textColorLink">?android:attr/colorPrimary</item>
+ </style>
+
+ <!-- TODO(a bug): This is only actively used in empty_content_view.xml. Move it there. -->
+ <style name="TextActionStyle">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">@dimen/call_log_action_height</item>
+ <item name="android:gravity">end|center_vertical</item>
+ <item name="android:paddingStart">@dimen/call_log_action_horizontal_padding</item>
+ <item name="android:paddingEnd">@dimen/call_log_action_horizontal_padding</item>
+ <item name="android:textColor">?android:attr/colorPrimary</item>
+ <item name="android:fontFamily">sans-serif-medium</item>
+ <item name="android:focusable">true</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:textAllCaps">true</item>
+ </style>
+</resources>
diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml
new file mode 100644
index 000000000..e01a3a282
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_dark.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 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>
+ <!-- Deprecated: ActionBars are clunky and Toolbar (along with Dialer.ThemeBase.NoActionBar)
+ should be used in favor-->
+ <style name="Dialer.Dark.ThemeBase.ActionBar">
+ <!-- These are used to style all actionbars in Dialer. These aren't needed in Dialer.ThemeBase.NoActionBar -->
+ <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
+ <item name="actionBarSize">@dimen/action_bar_height</item>
+ </style>
+
+ <style name="Dialer.Dark.ThemeBase.NoActionBar">
+ <!-- Copied from Theme.AppCompat.Light.NoActionBar. We can remove this and update the Dialer
+ base style once none of our activities depend on ActionBar anymore. -->
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+
+ <!-- Activities and Applications should inherit from one of the themes above. -->
+ <style name="Dialer.Dark.ThemeBase">
+ <!-- These values should be used to color all backgrounds. -->
+ <item name="android:colorBackground">@color/dialer_dark_background</item>
+ <item name="android:colorBackgroundFloating">@color/dialer_dark_background_floating</item>
+
+ <!-- These values should be used to set text color. -->
+ <!-- swap text colors. -->
+ <item name="android:textColorPrimary">@color/dialer_primary_text_color_inverse</item>
+ <item name="android:textColorSecondary">@color/dialer_secondary_text_color_inverse</item>
+ <item name="android:textColorPrimaryInverse">@color/dialer_primary_text_color</item>
+ <item name="android:textColorSecondaryInverse">@color/dialer_secondary_text_color</item>
+ <item name="android:textColorHint">@color/dialer_text_hint_color</item>
+
+ <!-- These will be automatically used to color most Appcompat/Material widgets. -->
+ <item name="android:colorPrimary">@color/dialer_theme_color</item>
+ <item name="colorPrimary">@color/dialer_theme_color</item>
+ <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
+ <item name="colorPrimaryDark">@color/dialer_theme_color_dark</item>
+ <item name="android:colorAccent">@color/dialer_secondary_color</item>
+ <item name="colorAccent">@color/dialer_secondary_color</item>
+
+ <!-- Used to automatically style check/selected checkbox, switches and radio buttons -->
+ <item name="colorControlActivated">?android:attr/colorPrimary</item>
+
+ <!-- Dialer specific attributes. -->
+ <item name="colorIcon">?android:attr/textColorSecondary</item>
+ <item name="colorIconSecondary">?android:attr/textColorSecondary</item>
+ <item name="colorTextOnUnthemedDarkBackground">@color/dialer_primary_text_color_inverse</item>
+ <item name="colorIconOnUnthemedDarkBackground">@color/dialer_icon_color_white</item>
+ </style>
+</resources> \ No newline at end of file
diff --git a/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml
new file mode 100644
index 000000000..667b9726d
--- /dev/null
+++ b/java/com/android/dialer/theme/base/res/values/theme_dialer_light.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2018 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>
+ <!-- Deprecated: ActionBars are clunky and Toolbar (along with Dialer.ThemeBase.NoActionBar)
+ should be used in favor-->
+ <style name="Dialer.ThemeBase.ActionBar">
+ <!-- These are used to style all actionbars in Dialer. These aren't needed in Dialer.ThemeBase.NoActionBar -->
+ <item name="actionBarStyle">@style/DialerActionBarBaseStyle</item>
+ <item name="actionBarSize">@dimen/action_bar_height</item>
+ </style>
+
+ <style name="Dialer.ThemeBase.NoActionBar">
+ <!-- Copied from Theme.AppCompat.Light.NoActionBar. We can remove this and update the Dialer
+ base style once none of our activities depend on ActionBar anymore. -->
+ <item name="windowActionBar">false</item>
+ <item name="windowNoTitle">true</item>
+ </style>
+
+ <!-- Activities and Applications should inherit from one of the themes above. -->
+ <style name="Dialer.ThemeBase">
+ <!-- These values should be used to color all backgrounds. -->
+ <item name="android:colorBackground">@color/dialer_background_light</item>
+ <item name="android:colorBackgroundFloating">@color/dialer_background_floating_light</item>
+
+ <!-- These values should be used to set text color. -->
+ <item name="android:textColorPrimary">@color/dialer_primary_text_color</item>
+ <item name="android:textColorSecondary">@color/dialer_secondary_text_color</item>
+ <item name="android:textColorPrimaryInverse">@color/dialer_primary_text_color_inverse</item>
+ <item name="android:textColorSecondaryInverse">@color/dialer_secondary_text_color_inverse</item>
+ <item name="android:textColorHint">@color/dialer_text_hint_color</item>
+
+ <!-- These will be automatically used to color most Appcompat/Material widgets. -->
+ <item name="android:colorPrimary">@color/dialer_theme_color</item>
+ <item name="colorPrimary">@color/dialer_theme_color</item>
+ <item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
+ <item name="colorPrimaryDark">@color/dialer_theme_color_dark</item>
+ <item name="android:colorAccent">@color/dialer_secondary_color</item>
+ <item name="colorAccent">@color/dialer_secondary_color</item>
+
+ <!-- Used to automatically style check/selected checkbox, switches and radio buttons -->
+ <item name="colorControlActivated">?android:attr/colorPrimary</item>
+
+ <!-- Dialer specific attributes. -->
+ <item name="colorIcon">@color/dialer_secondary_text_color</item>
+ <item name="colorIconSecondary">@color/dialer_icon_color_secondary</item>
+ <item name="colorTextOnUnthemedDarkBackground">@color/dialer_primary_text_color_inverse</item>
+ <item name="colorIconOnUnthemedDarkBackground">@color/dialer_icon_color_white</item>
+ </style>
+
+ <!-- TODO(a bug): investigate making this style's parent Dialer.ThemeBase.NoActionBar -->
+ <style name="Theme.AppCompat.Translucent" parent="Theme.AppCompat.NoActionBar">
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowBackground">@android:color/transparent</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
+ <item name="android:windowIsTranslucent">true</item>
+ <item name="android:windowAnimationStyle">@android:style/Animation</item>
+ </style>
+
+ <!-- Deprecated: Use Toolbar instead of ActionBar. -->
+ <!-- Used to style all Dialer's action bars. Every actionbar is awarded this for free if the parent
+ activity's theme extends from Dialer.ThemeBase.ActionBar or doesn't specify a theme. -->
+ <style name="DialerActionBarBaseStyle"
+ parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
+ <item name="android:background">?android:attr/colorPrimary</item>
+ <item name="background">?android:attr/colorPrimary</item>
+ </style>
+</resources>