summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoruabdullah <uabdullah@google.com>2018-03-01 17:09:45 -0800
committerCopybara-Service <copybara-piper@google.com>2018-03-01 18:18:13 -0800
commit6c81c662a38ed448722fe5251375fef4d4e1a59a (patch)
tree288fd78fc1f31978d5548411fea8c019f840a347
parent164ddd192af70ff07a4ad733180599e081a59046 (diff)
downloadandroid_packages_apps_Dialer-6c81c662a38ed448722fe5251375fef4d4e1a59a.tar.gz
android_packages_apps_Dialer-6c81c662a38ed448722fe5251375fef4d4e1a59a.tar.bz2
android_packages_apps_Dialer-6c81c662a38ed448722fe5251375fef4d4e1a59a.zip
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
-rw-r--r--java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java3
-rw-r--r--java/com/android/dialer/widget/EmptyContentView.java9
-rw-r--r--java/com/android/dialer/widget/res/layout-land/empty_content_view.xml2
-rw-r--r--java/com/android/dialer/widget/res/values/colors.xml16
4 files changed, 28 insertions, 2 deletions
diff --git a/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java b/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java
index 6d71dade9..3a5e72b6b 100644
--- a/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java
+++ b/java/com/android/dialer/voicemail/listui/NewVoicemailFragment.java
@@ -210,7 +210,8 @@ public final class NewVoicemailFragment extends Fragment implements LoaderCallba
showView(emptyContentView);
emptyContentView.setDescription((R.string.empty_voicemail_tab_text));
- emptyContentView.setImage(R.drawable.quantum_ic_schedule_vd_theme_24);
+ emptyContentView.setImage(R.drawable.quantum_ic_voicemail_vd_theme_24);
+ emptyContentView.setImageTint(R.color.empty_voicemail_icon_tint_color, null);
}
private void showView(View view) {
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 @@
<ImageView
android:id="@+id/empty_list_view_image"
android:layout_width="match_parent"
- android:layout_height="0dp"
+ android:layout_height="108dp"
android:layout_weight="1"
android:maxHeight="126dp"
android:gravity="center_horizontal"/>
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 @@
<?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 name="empty_list_text_color">#b2b2b2</color>
+ <color name="empty_voicemail_icon_tint_color">#E1E1E1</color>
</resources> \ No newline at end of file