summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-24 03:08:20 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-24 03:08:20 +0000
commit4b045c8f55a62ecb3bbecaffba254890840219db (patch)
treefb484e59da702a3b3284d11a600cbe75bb3f01cb
parentb201aba69fb94c182e694aa045b2971ecd4a44c3 (diff)
parentb0f66f7f0d013eaaa1aa045c9db076bf12e1eb74 (diff)
am b0f66f7f: Merge "Add shadows to call shortcut cards"
* commit 'b0f66f7f0d013eaaa1aa045c9db076bf12e1eb74': Add shadows to call shortcut cards
-rw-r--r--res/values/dimens.xml7
-rw-r--r--src/com/android/dialer/list/ShortcutCardsAdapter.java2
2 files changed, 8 insertions, 1 deletions
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index d9473617d..469677892 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -74,7 +74,7 @@
<!-- Z translation of the floating action button -->
<dimen name="floating_action_button_translation_z">5dp</dimen>
- <!-- Favorites tile and recent call log padding -->
+ <!-- Dimensions for speed dial tiles -->
<dimen name="contact_tile_divider_width">1dp</dimen>
<dimen name="contact_tile_info_button_height_and_width">36dp</dimen>
<item name="contact_tile_height_to_width_ratio" type="dimen">67%</item>
@@ -83,10 +83,15 @@
<dimen name="favorites_row_top_padding">1dp</dimen>
<dimen name="favorites_row_bottom_padding">0dp</dimen>
<dimen name="favorites_row_start_padding">1dp</dimen>
+
<!-- Padding from the last contact tile will provide the end padding. -->
<dimen name="favorites_row_end_padding">0dp</dimen>
<dimen name="favorites_row_undo_text_side_padding">32dp</dimen>
+
+ <!-- Dimensions for most recent call shortcut cards -->
+ <dimen name="recent_call_log_item_translation_z">5dp</dimen>
<dimen name="recent_call_log_item_padding">8dp</dimen>
+
<!-- Size of the star icon on the favorites tile. -->
<dimen name="favorites_star_icon_size">20dp</dimen>
diff --git a/src/com/android/dialer/list/ShortcutCardsAdapter.java b/src/com/android/dialer/list/ShortcutCardsAdapter.java
index afe28b6e2..b7ae1e3a0 100644
--- a/src/com/android/dialer/list/ShortcutCardsAdapter.java
+++ b/src/com/android/dialer/list/ShortcutCardsAdapter.java
@@ -209,6 +209,8 @@ public class ShortcutCardsAdapter extends BaseAdapter {
FrameLayout.LayoutParams.WRAP_CONTENT);
params.setMargins(mCallLogPadding, mCallLogPadding, mCallLogPadding, mCallLogPadding);
view.setLayoutParams(params);
+ view.setTranslationZ(getResources().getDimensionPixelSize(
+ R.dimen.recent_call_log_item_translation_z));
super.addView(view);
}