diff options
Diffstat (limited to 'java')
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 |