summaryrefslogtreecommitdiff
path: root/java/com/android/dialer/widget
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/widget
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/widget')
-rw-r--r--java/com/android/dialer/widget/DialerToolbar.java3
-rw-r--r--java/com/android/dialer/widget/EmptyContentView.java12
-rw-r--r--java/com/android/dialer/widget/res/drawable/ripple_material_light.xml23
-rw-r--r--java/com/android/dialer/widget/res/layout-land/empty_content_view.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/contact_photo_view.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/dialer_toolbar.xml12
-rw-r--r--java/com/android/dialer/widget/res/layout/empty_content_view.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/fragment_message.xml2
-rw-r--r--java/com/android/dialer/widget/res/layout/selectable_text_view.xml5
-rw-r--r--java/com/android/dialer/widget/res/values/colors.xml24
10 files changed, 16 insertions, 71 deletions
diff --git a/java/com/android/dialer/widget/DialerToolbar.java b/java/com/android/dialer/widget/DialerToolbar.java
index fe0e86110..02ec8c02c 100644
--- a/java/com/android/dialer/widget/DialerToolbar.java
+++ b/java/com/android/dialer/widget/DialerToolbar.java
@@ -23,6 +23,7 @@ import android.support.annotation.StringRes;
import android.support.v7.widget.Toolbar;
import android.util.AttributeSet;
import android.widget.TextView;
+import com.android.dialer.theme.base.ThemeComponent;
/** Toolbar widget for Dialer. */
public class DialerToolbar extends Toolbar {
@@ -37,7 +38,7 @@ public class DialerToolbar extends Toolbar {
subtitle = (TextView) findViewById(R.id.subtitle);
setElevation(getResources().getDimensionPixelSize(R.dimen.toolbar_elevation));
- setBackgroundColor(getResources().getColor(R.color.dialer_theme_color));
+ setBackgroundColor(ThemeComponent.get(context).theme().getColorPrimary());
setNavigationIcon(R.drawable.quantum_ic_close_white_24);
setNavigationContentDescription(R.string.toolbar_close);
setNavigationOnClickListener(v -> ((Activity) context).finish());
diff --git a/java/com/android/dialer/widget/EmptyContentView.java b/java/com/android/dialer/widget/EmptyContentView.java
index b99657a10..c0f9c9cac 100644
--- a/java/com/android/dialer/widget/EmptyContentView.java
+++ b/java/com/android/dialer/widget/EmptyContentView.java
@@ -18,9 +18,6 @@ package com.android.dialer.widget;
import android.content.Context;
import android.content.res.ColorStateList;
-import android.content.res.Resources.Theme;
-import android.support.annotation.ColorRes;
-import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.util.AttributeSet;
import android.view.LayoutInflater;
@@ -28,6 +25,7 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
+import com.android.dialer.theme.base.ThemeComponent;
public class EmptyContentView extends LinearLayout implements View.OnClickListener {
@@ -68,6 +66,9 @@ public class EmptyContentView extends LinearLayout implements View.OnClickListen
descriptionView = (TextView) findViewById(R.id.empty_list_view_message);
actionView = (TextView) findViewById(R.id.empty_list_view_action);
actionView.setOnClickListener(this);
+
+ imageView.setImageTintList(
+ ColorStateList.valueOf(ThemeComponent.get(context).theme().getColorIconSecondary()));
}
public void setDescription(int resourceId) {
@@ -90,11 +91,6 @@ public class EmptyContentView extends LinearLayout implements View.OnClickListen
}
}
- public void setImageTint(@ColorRes int color, @Nullable Theme theme) {
- imageView.setImageTintList(
- (ColorStateList.valueOf(getContext().getResources().getColor(color, theme))));
- }
-
public void setActionLabel(@StringRes int resourceId) {
actionLabel = resourceId;
if (resourceId == NO_LABEL) {
diff --git a/java/com/android/dialer/widget/res/drawable/ripple_material_light.xml b/java/com/android/dialer/widget/res/drawable/ripple_material_light.xml
deleted file mode 100644
index 175624c8b..000000000
--- a/java/com/android/dialer/widget/res/drawable/ripple_material_light.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?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
- -->
-
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
- android:color="@color/dialer_ripple_material_light">
- <item android:id="@android:id/mask">
- <color android:color="@android:color/white"/>
- </item>
-</ripple>
diff --git a/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml b/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml
index 3a7574f53..84e6fc825 100644
--- a/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml
+++ b/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml
@@ -32,7 +32,7 @@
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_horizontal|top"
- android:textColor="@color/empty_list_text_color"
+ android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/empty_list_message_text_size"/>
<TextView
diff --git a/java/com/android/dialer/widget/res/layout/contact_photo_view.xml b/java/com/android/dialer/widget/res/layout/contact_photo_view.xml
index 320d06b98..e13388649 100644
--- a/java/com/android/dialer/widget/res/layout/contact_photo_view.xml
+++ b/java/com/android/dialer/widget/res/layout/contact_photo_view.xml
@@ -68,7 +68,7 @@
android:layout_height="13dp"
android:layout_gravity="center"
android:src="@drawable/quantum_ic_rtt_vd_theme_24"
- android:tint="@android:color/white"
+ android:tint="?android:attr/colorBackground"
tools:ignore="ContentDescription"/>
</FrameLayout>
</FrameLayout> \ No newline at end of file
diff --git a/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml b/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
index 0540a00bc..a75176a22 100644
--- a/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
+++ b/java/com/android/dialer/widget/res/layout/dialer_toolbar.xml
@@ -28,19 +28,15 @@
android:layout_height="wrap_content"
android:gravity="top"
android:textSize="@dimen/toolbar_title_text_size"
- android:textColor="?android:attr/colorBackground"
- android:fontFamily="sans-serif-medium"
- android:maxLines="1"
- android:ellipsize="end"/>
+ android:textColor="?android:attr/textColorPrimaryInverse"
+ style="@style/Dialer.TextAppearance.Header2"/>
<TextView
android:id="@+id/subtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:textSize="@dimen/toolbar_subtitle_text_size"
- android:textColor="?android:attr/colorBackground"
+ android:textColor="?android:attr/textColorPrimaryInverse"
android:visibility="gone"
- android:maxLines="1"
- android:ellipsize="end"/>
+ style="@style/Dialer.TextAppearance.Secondary.Ellipsize"/>
</LinearLayout>
</merge> \ No newline at end of file
diff --git a/java/com/android/dialer/widget/res/layout/empty_content_view.xml b/java/com/android/dialer/widget/res/layout/empty_content_view.xml
index 9aac6f48f..57bb2fd5c 100644
--- a/java/com/android/dialer/widget/res/layout/empty_content_view.xml
+++ b/java/com/android/dialer/widget/res/layout/empty_content_view.xml
@@ -30,7 +30,7 @@
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:gravity="center_horizontal|top"
- android:textColor="@color/empty_list_text_color"
+ android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/empty_list_message_text_size"/>
<TextView
diff --git a/java/com/android/dialer/widget/res/layout/fragment_message.xml b/java/com/android/dialer/widget/res/layout/fragment_message.xml
index 388a8d55a..1004fa8f9 100644
--- a/java/com/android/dialer/widget/res/layout/fragment_message.xml
+++ b/java/com/android/dialer/widget/res/layout/fragment_message.xml
@@ -52,7 +52,7 @@
android:padding="@dimen/textview_item_padding"
android:textSize="@dimen/message_item_text_size"
android:hint="@string/custom_message_hint"
- android:textColor="@color/dialer_primary_text_color"
+ android:textColor="?android:attr/textColorPrimary"
android:textColorHint="?android:attr/textColorHint"
android:background="?android:attr/colorBackground"
android:textCursorDrawable="@drawable/edittext_custom_cursor"
diff --git a/java/com/android/dialer/widget/res/layout/selectable_text_view.xml b/java/com/android/dialer/widget/res/layout/selectable_text_view.xml
index 9cdb162b6..5e13d9a5e 100644
--- a/java/com/android/dialer/widget/res/layout/selectable_text_view.xml
+++ b/java/com/android/dialer/widget/res/layout/selectable_text_view.xml
@@ -19,7 +19,6 @@
android:id="@+id/selectable_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:textSize="16sp"
- android:textColor="@color/dialer_primary_text_color"
+ style="@style/Dialer.TextAppearance.Primary"
android:padding="16dp"
- android:background="@drawable/ripple_material_light"/> \ No newline at end of file
+ android:background="?android:selectableItemBackground"/> \ No newline at end of file
diff --git a/java/com/android/dialer/widget/res/values/colors.xml b/java/com/android/dialer/widget/res/values/colors.xml
deleted file mode 100644
index 70c3197cf..000000000
--- a/java/com/android/dialer/widget/res/values/colors.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?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>
-
- <!-- Color of ripples used for views with light backgrounds -->
- <color name="dialer_ripple_material_light">#30000000</color>
-
- <color name="empty_list_text_color">#b2b2b2</color>
- <color name="empty_voicemail_icon_tint_color">#E1E1E1</color>
-</resources> \ No newline at end of file