diff options
-rw-r--r-- | res/layout/call_log_list_item.xml | 1 | ||||
-rw-r--r-- | res/values/dimens.xml | 7 | ||||
-rw-r--r-- | res/values/styles.xml | 2 | ||||
-rw-r--r-- | src/com/android/dialer/calllog/CallLogAdapter.java | 13 | ||||
-rw-r--r-- | src/com/android/dialer/list/ShortcutCardsAdapter.java | 24 |
5 files changed, 38 insertions, 9 deletions
diff --git a/res/layout/call_log_list_item.xml b/res/layout/call_log_list_item.xml index 9899424c4..31dcd88f4 100644 --- a/res/layout/call_log_list_item.xml +++ b/res/layout/call_log_list_item.xml @@ -81,6 +81,7 @@ android:id="@+id/name" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginBottom="@dimen/call_log_name_margin_bottom" android:layout_marginEnd="@dimen/call_log_icon_margin" android:textColor="?attr/call_log_primary_text_color" android:textSize="@dimen/call_log_primary_text_size" diff --git a/res/values/dimens.xml b/res/values/dimens.xml index dc285cffd..e388065f2 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -33,6 +33,7 @@ <dimen name="call_log_outer_margin">8dp</dimen> <dimen name="call_log_start_margin">16dp</dimen> <dimen name="call_log_indent_margin">24dip</dimen> + <dimen name="call_log_name_margin_bottom">2dp</dimen> <dimen name="call_log_list_item_height">56dip</dimen> <dimen name="call_log_list_contact_photo_size">40dip</dimen> <dimen name="call_detail_contact_name_margin">24dip</dimen> @@ -62,9 +63,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 ebf7da811..1044a1eba 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -103,7 +103,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/calllog/CallLogAdapter.java b/src/com/android/dialer/calllog/CallLogAdapter.java index 475262055..924a17fc2 100644 --- a/src/com/android/dialer/calllog/CallLogAdapter.java +++ b/src/com/android/dialer/calllog/CallLogAdapter.java @@ -578,7 +578,15 @@ public class CallLogAdapter extends GroupingListAdapter protected View newChildView(Context context, ViewGroup parent) { LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); View view = inflater.inflate(R.layout.call_log_list_item, parent, false); - findAndCacheViews(view); + + // Get the views to bind to and cache them. + CallLogListItemViews views = CallLogListItemViews.fromView(view); + view.setTag(views); + + // Set text height to false on the TextViews so they don't have extra padding. + views.phoneCallDetailsViews.nameView.setElegantTextHeight(false); + views.phoneCallDetailsViews.callLocationAndDate.setElegantTextHeight(false); + return view; } @@ -599,9 +607,6 @@ public class CallLogAdapter extends GroupingListAdapter } private void findAndCacheViews(View view) { - // Get the views to bind to. - CallLogListItemViews views = CallLogListItemViews.fromView(view); - view.setTag(views); } /** 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)); |