diff options
author | Yorke Lee <yorkelee@google.com> | 2013-07-30 20:34:30 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-07-30 20:34:30 +0000 |
commit | 114ac7c63c9cc53a2c5159f5f34fb9390d28cc85 (patch) | |
tree | 2f388319e294bea458cc6669b1cc174d6b5b3eac | |
parent | e1bee07393f2473f4f8e03b05844f73889e2b1a1 (diff) | |
parent | d6a16d364de95c8eb0d9c4f5a07d5ad6387c8470 (diff) |
Merge "Change overlay and styles for contact tiles"
-rw-r--r-- | res/drawable-hdpi/shadow_contact_photo.png | bin | 0 -> 346 bytes | |||
-rw-r--r-- | res/drawable-mdpi/shadow_contact_photo.png | bin | 0 -> 339 bytes | |||
-rw-r--r-- | res/drawable-xhdpi/shadow_contact_photo.png | bin | 0 -> 353 bytes | |||
-rw-r--r-- | res/layout/phone_favorite_tile_view.xml | 44 | ||||
-rw-r--r-- | res/values/colors.xml | 2 | ||||
-rw-r--r-- | res/values/dimens.xml | 3 | ||||
-rw-r--r-- | src/com/android/dialer/list/PhoneFavoritesTileAdapter.java | 2 |
7 files changed, 30 insertions, 21 deletions
diff --git a/res/drawable-hdpi/shadow_contact_photo.png b/res/drawable-hdpi/shadow_contact_photo.png Binary files differnew file mode 100644 index 000000000..49cbb97dc --- /dev/null +++ b/res/drawable-hdpi/shadow_contact_photo.png diff --git a/res/drawable-mdpi/shadow_contact_photo.png b/res/drawable-mdpi/shadow_contact_photo.png Binary files differnew file mode 100644 index 000000000..4734bbd21 --- /dev/null +++ b/res/drawable-mdpi/shadow_contact_photo.png diff --git a/res/drawable-xhdpi/shadow_contact_photo.png b/res/drawable-xhdpi/shadow_contact_photo.png Binary files differnew file mode 100644 index 000000000..1077ec1c8 --- /dev/null +++ b/res/drawable-xhdpi/shadow_contact_photo.png diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml index bf9020557..e82a4e2f1 100644 --- a/res/layout/phone_favorite_tile_view.xml +++ b/res/layout/phone_favorite_tile_view.xml @@ -16,14 +16,14 @@ <view xmlns:android="http://schemas.android.com/apk/res/android" android:background="@null" - android:paddingBottom="1dip" - android:paddingRight="1dip" - android:paddingEnd="1dip" + android:paddingBottom="1dp" + android:paddingRight="1dp" + android:paddingEnd="1dp" class="com.android.dialer.list.PhoneFavoriteTileView" > <RelativeLayout android:layout_width="match_parent" - android:layout_height="match_parent" > + android:layout_height="match_parent"> <com.android.contacts.common.widget.LayoutSuppressingImageView android:id="@+id/contact_tile_image" @@ -31,23 +31,29 @@ android:layout_height="match_parent" android:scaleType="centerCrop" /> + <View + android:id="@+id/shadow_overlay" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@drawable/shadow_contact_photo"/> + <TextView android:id="@+id/contact_tile_name" android:layout_width="match_parent" - android:layout_height="@dimen/contact_tile_shadowbox_height" - android:background="@color/contact_tile_shadow_box_color" + android:layout_height="@dimen/contact_tile_info_button_height_and_width" android:gravity="center_vertical" - android:textColor="@android:color/white" + android:textColor="@color/contact_tile_name_color" + android:fontFamily="sans-serif-light" android:singleLine="true" android:textSize="16sp" android:fadingEdge="horizontal" android:fadingEdgeLength="3dip" android:ellipsize="marquee" android:layout_alignParentBottom="true" - android:paddingLeft="8dip" - android:paddingRight="47dip" - android:paddingStart="8dip" - android:paddingEnd="47dip" + android:paddingLeft="8dp" + android:paddingRight="@dimen/contact_tile_info_button_height_and_width" + android:paddingStart="8dp" + android:paddingEnd="@dimen/contact_tile_info_button_height_and_width" android:textAlignment="viewStart" /> <View @@ -62,14 +68,14 @@ android:id="@id/contact_tile_secondary_button" android:src="@drawable/ic_contact_info" android:background="?android:attr/selectableItemBackground" - android:layout_height="@dimen/contact_tile_shadowbox_height" - android:layout_width="48dip" - android:paddingLeft="12dip" - android:paddingRight="12dip" - android:paddingStart="12dip" - android:paddingEnd="12dip" - android:paddingTop="12dip" - android:paddingBottom="12dip" + android:layout_height="@dimen/contact_tile_info_button_height_and_width" + android:layout_width="@dimen/contact_tile_info_button_height_and_width" + android:paddingLeft="8dp" + android:paddingRight="8dp" + android:paddingStart="8dp" + android:paddingEnd="8dp" + android:paddingTop="8dp" + android:paddingBottom="8dp" android:layout_alignParentBottom="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" diff --git a/res/values/colors.xml b/res/values/colors.xml index df4b2f45d..85ccc6857 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -69,4 +69,6 @@ <!-- Text color of the search box --> <color name="searchbox_text_color">#d3d3d3</color> + <!-- Color of the contact name in favorite tiles --> + <color name="contact_tile_name_color">#f0f0f0</color> </resources> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 452bb311c..061be73b9 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -59,7 +59,8 @@ <dimen name="smartdial_confidence_hint_text_size">27dp</dimen> <!-- Favorites tile and recent call log padding --> - <dimen name="phone_contact_tile_divider_padding">3dp</dimen> + <dimen name="contact_tile_divider_padding">3dp</dimen> + <dimen name="contact_tile_info_button_height_and_width">36dp</dimen> <dimen name="favorites_row_top_padding">8dp</dimen> <dimen name="favorites_row_bottom_padding">8dp</dimen> <dimen name="favorites_row_start_padding">8dp</dimen> diff --git a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java index 36579061a..2f3facfc9 100644 --- a/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java +++ b/src/com/android/dialer/list/PhoneFavoritesTileAdapter.java @@ -93,7 +93,7 @@ public class PhoneFavoritesTileAdapter extends BaseAdapter { // Converting padding in dips to padding in pixels mPaddingInPixels = mContext.getResources() - .getDimensionPixelSize(R.dimen.phone_contact_tile_divider_padding); + .getDimensionPixelSize(R.dimen.contact_tile_divider_padding); bindColumnIndices(); } |