From e2d0e484f2db6e866b1986e37ea6f56e2657944e Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Wed, 12 Mar 2014 12:07:40 -0700 Subject: DO NOT MERGE Slight UX tweaks to Dialer * Add drawable and apply to dialpad fragment for shadow effect * Tweak name/number padding in tiles * Tweak default letter avatar placing in tiles * Add shadow for dialpad * Swap out 9patch drawable for recents * Add 9patch to contact tile Bug: 13421236 Bug: 13418523 Bug: 13421916 Bug: 13421236 Bug: 13419201 Bug: 13418712 Change-Id: I6ff8fe41d7e2d02db105bb542f425be13ae5fef7 --- res/drawable-hdpi/dialer_recent_card_bg.9.png | Bin 199 -> 0 bytes .../ic_tile_for_recents_and_contact_tile.9.png | Bin 0 -> 333 bytes res/drawable-mdpi/dialer_recent_card_bg.9.png | Bin 180 -> 0 bytes .../ic_tile_for_recents_and_contact_tile.9.png | Bin 0 -> 205 bytes res/drawable-xhdpi/dialer_recent_card_bg.9.png | Bin 226 -> 0 bytes .../ic_tile_for_recents_and_contact_tile.9.png | Bin 0 -> 427 bytes res/drawable-xxhdpi/dialer_recent_card_bg.9.png | Bin 244 -> 0 bytes .../ic_tile_for_recents_and_contact_tile.9.png | Bin 0 -> 1307 bytes res/drawable/shadow_fade_up.xml | 24 +++++++++++++++++++++ res/layout/dialpad.xml | 1 - res/layout/dialpad_fragment.xml | 6 +++++- res/layout/phone_favorite_tile_view.xml | 13 +++++------ res/values/dimens.xml | 2 ++ .../dialer/list/PhoneFavoriteMergedAdapter.java | 2 +- .../android/dialer/list/PhoneFavoriteTileView.java | 8 +++---- 15 files changed, 43 insertions(+), 13 deletions(-) delete mode 100644 res/drawable-hdpi/dialer_recent_card_bg.9.png create mode 100644 res/drawable-hdpi/ic_tile_for_recents_and_contact_tile.9.png delete mode 100644 res/drawable-mdpi/dialer_recent_card_bg.9.png create mode 100644 res/drawable-mdpi/ic_tile_for_recents_and_contact_tile.9.png delete mode 100644 res/drawable-xhdpi/dialer_recent_card_bg.9.png create mode 100644 res/drawable-xhdpi/ic_tile_for_recents_and_contact_tile.9.png delete mode 100644 res/drawable-xxhdpi/dialer_recent_card_bg.9.png create mode 100644 res/drawable-xxhdpi/ic_tile_for_recents_and_contact_tile.9.png create mode 100644 res/drawable/shadow_fade_up.xml diff --git a/res/drawable-hdpi/dialer_recent_card_bg.9.png b/res/drawable-hdpi/dialer_recent_card_bg.9.png deleted file mode 100644 index 2bfdbcb9c..000000000 Binary files a/res/drawable-hdpi/dialer_recent_card_bg.9.png and /dev/null differ diff --git a/res/drawable-hdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-hdpi/ic_tile_for_recents_and_contact_tile.9.png new file mode 100644 index 000000000..b5f50de3c Binary files /dev/null and b/res/drawable-hdpi/ic_tile_for_recents_and_contact_tile.9.png differ diff --git a/res/drawable-mdpi/dialer_recent_card_bg.9.png b/res/drawable-mdpi/dialer_recent_card_bg.9.png deleted file mode 100644 index dff6a0b84..000000000 Binary files a/res/drawable-mdpi/dialer_recent_card_bg.9.png and /dev/null differ diff --git a/res/drawable-mdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-mdpi/ic_tile_for_recents_and_contact_tile.9.png new file mode 100644 index 000000000..e43b3efd4 Binary files /dev/null and b/res/drawable-mdpi/ic_tile_for_recents_and_contact_tile.9.png differ diff --git a/res/drawable-xhdpi/dialer_recent_card_bg.9.png b/res/drawable-xhdpi/dialer_recent_card_bg.9.png deleted file mode 100644 index 05d254d6a..000000000 Binary files a/res/drawable-xhdpi/dialer_recent_card_bg.9.png and /dev/null differ diff --git a/res/drawable-xhdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-xhdpi/ic_tile_for_recents_and_contact_tile.9.png new file mode 100644 index 000000000..ebfe89791 Binary files /dev/null and b/res/drawable-xhdpi/ic_tile_for_recents_and_contact_tile.9.png differ diff --git a/res/drawable-xxhdpi/dialer_recent_card_bg.9.png b/res/drawable-xxhdpi/dialer_recent_card_bg.9.png deleted file mode 100644 index 87d95f0ed..000000000 Binary files a/res/drawable-xxhdpi/dialer_recent_card_bg.9.png and /dev/null differ diff --git a/res/drawable-xxhdpi/ic_tile_for_recents_and_contact_tile.9.png b/res/drawable-xxhdpi/ic_tile_for_recents_and_contact_tile.9.png new file mode 100644 index 000000000..0a99cdb26 Binary files /dev/null and b/res/drawable-xxhdpi/ic_tile_for_recents_and_contact_tile.9.png differ diff --git a/res/drawable/shadow_fade_up.xml b/res/drawable/shadow_fade_up.xml new file mode 100644 index 000000000..e2d993484 --- /dev/null +++ b/res/drawable/shadow_fade_up.xml @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml index c3db42094..c13f525be 100644 --- a/res/layout/dialpad.xml +++ b/res/layout/dialpad.xml @@ -22,7 +22,6 @@ android:layout_height="wrap_content" android:paddingLeft="5dp" android:paddingRight="5dp" - android:background="@android:color/transparent" android:stretchColumns="*" android:layoutDirection="ltr" > diff --git a/res/layout/dialpad_fragment.xml b/res/layout/dialpad_fragment.xml index 239f72774..dfe5c7c84 100644 --- a/res/layout/dialpad_fragment.xml +++ b/res/layout/dialpad_fragment.xml @@ -25,7 +25,11 @@ android:layout_height="0dp" android:layout_weight="1" android:background="#00000000" /> - + + + android:focusable="true" + android:background="@drawable/ic_tile_for_recents_and_contact_tile"> 3dp 36dp 67% + 10dp + 9dp 6dp 6dp 8dp diff --git a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java b/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java index 546367071..6307613eb 100644 --- a/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java +++ b/src/com/android/dialer/list/PhoneFavoriteMergedAdapter.java @@ -345,7 +345,7 @@ public class PhoneFavoriteMergedAdapter extends BaseAdapter { @Override public void addView(View view) { - view.setBackgroundResource(R.drawable.dialer_recent_card_bg); + view.setBackgroundResource(R.drawable.ic_tile_for_recents_and_contact_tile); final FrameLayout.LayoutParams params = new FrameLayout.LayoutParams( FrameLayout.LayoutParams.MATCH_PARENT, diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java index 471601d2b..9d36fb2a6 100644 --- a/src/com/android/dialer/list/PhoneFavoriteTileView.java +++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java @@ -48,11 +48,11 @@ public abstract class PhoneFavoriteTileView extends ContactTileView { private static final String TAG = PhoneFavoriteTileView.class.getSimpleName(); private static final boolean DEBUG = false; - // These parameters instruct the photo manager to display the default image/letter at 70% of - // its normal size, and vertically offset upwards 20% towards the top of the letter tile, to + // These parameters instruct the photo manager to display the default image/letter at 65% of + // its normal size, and vertically offset upwards 17% towards the top of the letter tile, to // make room for the contact name and number label at the bottom of the image. - private static final float DEFAULT_IMAGE_LETTER_OFFSET = -0.2f; - private static final float DEFAULT_IMAGE_LETTER_SCALE = 0.70f; + private static final float DEFAULT_IMAGE_LETTER_OFFSET = -0.17f; + private static final float DEFAULT_IMAGE_LETTER_SCALE = 0.65f; /** Length of all animations in miniseconds. */ private int mAnimationDuration; -- cgit v1.2.3