summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-04-23 17:35:13 -0700
committerYorke Lee <yorkelee@google.com>2014-04-23 17:35:13 -0700
commit1467993a7198348dd6e0be53d8e09e341f241912 (patch)
treee5fff57f14a6052a2ded5c2b8f7b781277873f53
parentd999b71452baebec789f6f58f1955d30e834826d (diff)
Add shadows to call shortcut cards
Change-Id: I9bf8dba8a0cc54a18b0d465b11b60ca297cf4a12
-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 496eb433d..054c6a4b5 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -67,7 +67,7 @@
<!-- Min width of fake menu buttons, which should be same as ActionBar's one -->
<dimen name="fake_menu_button_min_width">56dp</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>
@@ -76,10 +76,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 4cca20b3d..0009ee57f 100644
--- a/src/com/android/dialer/list/ShortcutCardsAdapter.java
+++ b/src/com/android/dialer/list/ShortcutCardsAdapter.java
@@ -208,6 +208,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);
}