From 6c81c662a38ed448722fe5251375fef4d4e1a59a Mon Sep 17 00:00:00 2001 From: uabdullah Date: Thu, 1 Mar 2018 17:09:45 -0800 Subject: Use voicemail image for empty voicemail tab and update color This CL updates the icon for the empty voicemail tab and updates the tint of it as well. It also updates the size of the voicemail icon when in landscape mode. Bug: 25661977,74085541 Test: N/A PiperOrigin-RevId: 187557890 Change-Id: Ic19643f4e63e3ce70ba6b029ce45a570404f28e7 --- java/com/android/dialer/widget/EmptyContentView.java | 9 +++++++++ .../dialer/widget/res/layout-land/empty_content_view.xml | 2 +- java/com/android/dialer/widget/res/values/colors.xml | 16 ++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) (limited to 'java/com/android/dialer/widget') diff --git a/java/com/android/dialer/widget/EmptyContentView.java b/java/com/android/dialer/widget/EmptyContentView.java index 5c2e4d501..b99657a10 100644 --- a/java/com/android/dialer/widget/EmptyContentView.java +++ b/java/com/android/dialer/widget/EmptyContentView.java @@ -17,6 +17,10 @@ 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; @@ -86,6 +90,11 @@ 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/layout-land/empty_content_view.xml b/java/com/android/dialer/widget/res/layout-land/empty_content_view.xml index 00344bf44..3a7574f53 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 @@ -18,7 +18,7 @@ diff --git a/java/com/android/dialer/widget/res/values/colors.xml b/java/com/android/dialer/widget/res/values/colors.xml index c974609ef..12a5cb999 100644 --- a/java/com/android/dialer/widget/res/values/colors.xml +++ b/java/com/android/dialer/widget/res/values/colors.xml @@ -1,4 +1,20 @@ + #b2b2b2 + #E1E1E1 \ No newline at end of file -- cgit v1.2.3