diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-29 22:00:17 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-05-29 22:00:17 +0000 |
commit | 64094de45f90dcdd8a5f7de4c9641aac26479ec9 (patch) | |
tree | a16158a1648dfbc7954b049ce7e62355c8216ee7 | |
parent | 00edc1314b8b1ebbf8f922e35e8fc2c7b1d69b15 (diff) | |
parent | 42b977b89772b74cfabd182ee22be0f0d76b960e (diff) |
am 42b977b8: Merge "Adjust recent cards redline." into lmp-preview-dev
* commit '42b977b89772b74cfabd182ee22be0f0d76b960e':
Adjust recent cards redline.
-rw-r--r-- | res/values/dimens.xml | 6 | ||||
-rw-r--r-- | res/values/styles.xml | 2 | ||||
-rw-r--r-- | src/com/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 9c9bbeb4c..b753a1418 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -58,9 +58,13 @@ <!-- Dimensions for most recent call shortcut cards --> <dimen name="recent_call_log_item_translation_z">4dp</dimen> - <dimen name="recent_call_log_item_padding">8dp</dimen> + <dimen name="recent_call_log_item_margin">8dp</dimen> + <dimen name="recent_call_log_item_margin_bottom">6dp</dimen> + <!-- The maximum amount to clip on the left and right of the recent call shortcut card --> <dimen name="recent_call_log_item_horizontal_clip_limit">20dp</dimen> + <dimen name="recent_call_log_item_padding_start">8dp</dimen> + <dimen name="recent_call_log_item_padding_bottom">7dp</dimen> <!-- Size of the star icon on the favorites tile. --> <dimen name="favorites_star_icon_size">12dp</dimen> 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 @@ <!-- CallLog --> <item name="call_log_primary_text_color">#404040</item> <item name="call_log_primary_background_color">#FFFFFF</item> - <item name="call_log_secondary_text_color">#9a9a9a</item> + <item name="call_log_secondary_text_color">#8f8f8f</item> <item name="call_log_secondary_background_color">#FFFFFF</item> <item name="call_log_header_color">#FFFFFF</item> <!-- VoicemailStatus --> 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)); |