From 955393ba53d56b011055dde3af83ec3e26b27b4a Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Thu, 29 May 2014 12:38:19 -0700 Subject: Adjust recent cards redline. - Changed secondary call log item color to lighter grey. - Take 1dp off the bottom of the recent card. - Take 2dp off the margin below the recent card. Bug: 15196725 Change-Id: I0dd159a098947128258b7d49f946f2420738a06b --- res/values/dimens.xml | 6 +++++- res/values/styles.xml | 2 +- .../android/dialer/list/ShortcutCardsAdapter.java | 24 +++++++++++++++++++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/res/values/dimens.xml b/res/values/dimens.xml index dc285cffd..24161c7e2 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -62,9 +62,13 @@ 4dp - 8dp + 8dp + 6dp + 20dp + 8dp + 7dp 12dp diff --git a/res/values/styles.xml b/res/values/styles.xml index e47c05e35..c5c54a3fb 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -102,7 +102,7 @@ #404040 #FFFFFF - #9a9a9a + #8f8f8f #FFFFFF #FFFFFF diff --git a/src/com/android/dialer/list/ShortcutCardsAdapter.java b/src/com/android/dialer/list/ShortcutCardsAdapter.java index 4df44f0e2..a39bed54a 100644 --- a/src/com/android/dialer/list/ShortcutCardsAdapter.java +++ b/src/com/android/dialer/list/ShortcutCardsAdapter.java @@ -27,6 +27,7 @@ import android.view.ViewConfiguration; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.FrameLayout; +import android.widget.LinearLayout; import com.android.dialer.R; import com.android.dialer.calllog.CallLogAdapter; @@ -54,7 +55,10 @@ public class ShortcutCardsAdapter extends BaseAdapter { private final ListsFragment mFragment; - private final int mCallLogPadding; + private final int mCallLogMargin; + private final int mCallLogMarginBottom; + private final int mCallLogPaddingStart; + private final int mCallLogPaddingBottom; private final int mCardMaxHorizontalClip; private final Context mContext; @@ -104,7 +108,14 @@ public class ShortcutCardsAdapter extends BaseAdapter { mFragment = fragment; mCardMaxHorizontalClip = resources.getDimensionPixelSize( R.dimen.recent_call_log_item_horizontal_clip_limit); - mCallLogPadding = resources.getDimensionPixelSize(R.dimen.recent_call_log_item_padding); + mCallLogMargin = resources.getDimensionPixelSize(R.dimen.recent_call_log_item_margin); + mCallLogMarginBottom = + resources.getDimensionPixelSize(R.dimen.recent_call_log_item_margin_bottom); + mCallLogPaddingStart = + resources.getDimensionPixelSize(R.dimen.recent_call_log_item_padding_start); + mCallLogPaddingBottom = + resources.getDimensionPixelSize(R.dimen.recent_call_log_item_padding_bottom); + mCallLogAdapter = callLogAdapter; mObserver = new CustomDataSetObserver(); mCallLogAdapter.registerDataSetObserver(mObserver); @@ -211,8 +222,15 @@ public class ShortcutCardsAdapter extends BaseAdapter { final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT); - params.setMargins(mCallLogPadding, mCallLogPadding, mCallLogPadding, mCallLogPadding); + params.setMargins(mCallLogMargin, mCallLogMargin, mCallLogMargin, mCallLogMarginBottom); view.setLayoutParams(params); + + LinearLayout actionView = + (LinearLayout)view.findViewById(R.id.primary_action_view); + actionView.setPaddingRelative( + mCallLogPaddingStart, actionView.getPaddingTop(), + actionView.getPaddingEnd(), mCallLogPaddingBottom); + view.setTranslationZ(getResources().getDimensionPixelSize( R.dimen.recent_call_log_item_translation_z)); -- cgit v1.2.3