diff options
author | Yorke Lee <yorkelee@google.com> | 2014-02-10 16:09:12 -0800 |
---|---|---|
committer | Jay Shrauner <shrauner@google.com> | 2014-03-04 06:11:13 +0000 |
commit | 3ce60186f646b461635b16d7d9a806ddc0b61bac (patch) | |
tree | 116aeb83ea4299383396abd52dd767d7f5522f9b /res | |
parent | 2c1f343c68df2ce40b171e88f5660942053b1322 (diff) |
Switch favorites screen to grid layout
* Add logic to PhoneFavoritesTileAdapter so that it now supports an
unlimited number of tiled rows.
* Tiles now have a configurable height to width ratio.
* Fix animations so that tiles moving up and down rows appear to animate
in from the correct direction. Tiles moving to the row above should animate
in from right to left. Tiles moving to the row below should animate in from
left to right.
* Update the number of columns in the grid to 2.
* Update layout of individual tiles to match redlines from UX.
* Tweak font sizes for tiles
* No longer truncate names in tiles
* Tiles have a 2-3 height to width ratio
* Update assets and layout for favorite and more info icons
* Add content description for the favorite button
* Add tests for PhoneFavoritesTileAdapter
Bug: 13083459
Change-Id: I50b298f0941698985d281f13e6a87c5a9b613efa
(cherry picked from commit 765734c1d602c9a6d166d653b3684e6408b771c4)
Diffstat (limited to 'res')
20 files changed, 27 insertions, 24 deletions
diff --git a/res/drawable-hdpi/ic_contact_info.png b/res/drawable-hdpi/ic_contact_info.png Binary files differdeleted file mode 100644 index 9c23000d9..000000000 --- a/res/drawable-hdpi/ic_contact_info.png +++ /dev/null diff --git a/res/drawable-hdpi/ic_star_marked_as_fav.png b/res/drawable-hdpi/ic_star_marked_as_fav.png Binary files differdeleted file mode 100644 index 8a138c478..000000000 --- a/res/drawable-hdpi/ic_star_marked_as_fav.png +++ /dev/null diff --git a/res/drawable-hdpi/overflow_thumbnail.png b/res/drawable-hdpi/overflow_thumbnail.png Binary files differnew file mode 100644 index 000000000..57db353f7 --- /dev/null +++ b/res/drawable-hdpi/overflow_thumbnail.png diff --git a/res/drawable-hdpi/star_thumbnail.png b/res/drawable-hdpi/star_thumbnail.png Binary files differnew file mode 100644 index 000000000..1d4d5e184 --- /dev/null +++ b/res/drawable-hdpi/star_thumbnail.png diff --git a/res/drawable-mdpi/ic_contact_info.png b/res/drawable-mdpi/ic_contact_info.png Binary files differdeleted file mode 100644 index 5d35ec579..000000000 --- a/res/drawable-mdpi/ic_contact_info.png +++ /dev/null diff --git a/res/drawable-mdpi/ic_star_marked_as_fav.png b/res/drawable-mdpi/ic_star_marked_as_fav.png Binary files differdeleted file mode 100644 index ee1b5ec1c..000000000 --- a/res/drawable-mdpi/ic_star_marked_as_fav.png +++ /dev/null diff --git a/res/drawable-mdpi/overflow_thumbnail.png b/res/drawable-mdpi/overflow_thumbnail.png Binary files differnew file mode 100644 index 000000000..c69937428 --- /dev/null +++ b/res/drawable-mdpi/overflow_thumbnail.png diff --git a/res/drawable-mdpi/star_thumbnail.png b/res/drawable-mdpi/star_thumbnail.png Binary files differnew file mode 100644 index 000000000..7b96272cf --- /dev/null +++ b/res/drawable-mdpi/star_thumbnail.png diff --git a/res/drawable-xhdpi/ic_contact_info.png b/res/drawable-xhdpi/ic_contact_info.png Binary files differdeleted file mode 100644 index 88d367b65..000000000 --- a/res/drawable-xhdpi/ic_contact_info.png +++ /dev/null diff --git a/res/drawable-xhdpi/ic_star_marked_as_fav.png b/res/drawable-xhdpi/ic_star_marked_as_fav.png Binary files differdeleted file mode 100644 index 372747a80..000000000 --- a/res/drawable-xhdpi/ic_star_marked_as_fav.png +++ /dev/null diff --git a/res/drawable-xhdpi/overflow_thumbnail.png b/res/drawable-xhdpi/overflow_thumbnail.png Binary files differnew file mode 100644 index 000000000..e538b9894 --- /dev/null +++ b/res/drawable-xhdpi/overflow_thumbnail.png diff --git a/res/drawable-xhdpi/star_thumbnail.png b/res/drawable-xhdpi/star_thumbnail.png Binary files differnew file mode 100644 index 000000000..a71262fb5 --- /dev/null +++ b/res/drawable-xhdpi/star_thumbnail.png diff --git a/res/drawable-xxhdpi/ic_contact_info.png b/res/drawable-xxhdpi/ic_contact_info.png Binary files differdeleted file mode 100644 index e5d2939cd..000000000 --- a/res/drawable-xxhdpi/ic_contact_info.png +++ /dev/null diff --git a/res/drawable-xxhdpi/ic_star_marked_as_fav.png b/res/drawable-xxhdpi/ic_star_marked_as_fav.png Binary files differdeleted file mode 100644 index 3eeff4c05..000000000 --- a/res/drawable-xxhdpi/ic_star_marked_as_fav.png +++ /dev/null diff --git a/res/drawable-xxhdpi/overflow_thumbnail.png b/res/drawable-xxhdpi/overflow_thumbnail.png Binary files differnew file mode 100644 index 000000000..7f3f73386 --- /dev/null +++ b/res/drawable-xxhdpi/overflow_thumbnail.png diff --git a/res/drawable-xxhdpi/star_thumbnail.png b/res/drawable-xxhdpi/star_thumbnail.png Binary files differnew file mode 100644 index 000000000..5f13fec1d --- /dev/null +++ b/res/drawable-xxhdpi/star_thumbnail.png diff --git a/res/layout/phone_favorite_regular_row_view.xml b/res/layout/phone_favorite_regular_row_view.xml index 012c9be2f..0d131f6fe 100644 --- a/res/layout/phone_favorite_regular_row_view.xml +++ b/res/layout/phone_favorite_regular_row_view.xml @@ -75,7 +75,7 @@ android:layout_marginRight="7dip" android:layout_marginEnd="7dip" android:layout_marginBottom="7dip" - android:src="@drawable/ic_star_marked_as_fav" + android:src="@drawable/star_thumbnail" android:visibility="gone" /> </RelativeLayout> diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml index 8806d3985..c4ad7800d 100644 --- a/res/layout/phone_favorite_tile_view.xml +++ b/res/layout/phone_favorite_tile_view.xml @@ -46,7 +46,7 @@ android:paddingRight="@dimen/contact_tile_info_button_height_and_width" android:paddingStart="8dp" android:paddingEnd="@dimen/contact_tile_info_button_height_and_width" - android:paddingBottom="4dp" + android:paddingBottom="12dp" android:layout_alignParentBottom="true" android:orientation="vertical" > <TextView @@ -57,7 +57,7 @@ android:textColor="@color/contact_tile_name_color" android:fontFamily="sans-serif" android:singleLine="true" - android:textSize="16sp" + android:textSize="15sp" android:fadingEdge="horizontal" android:fadingEdgeLength="3dip" android:ellipsize="marquee" @@ -70,7 +70,7 @@ android:textColor="@color/contact_tile_name_color" android:fontFamily="sans-serif" android:singleLine="true" - android:textSize="12sp" + android:textSize="11sp" android:paddingBottom="2dp" android:fadingEdge="horizontal" android:fadingEdgeLength="3dip" @@ -90,35 +90,37 @@ android:background="?android:attr/selectableItemBackground" 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:paddingLeft="2dp" + android:paddingRight="2dp" + android:paddingStart="2dp" + android:paddingEnd="2dp" + android:paddingTop="2dp" + android:paddingBottom="2dp" + android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" - android:src="@drawable/ic_star_marked_as_fav" + android:src="@drawable/star_thumbnail" android:scaleType="center" + android:contentDescription="@string/description_view_contact_detail" android:visibility="gone" /> <ImageButton android:id="@id/contact_tile_secondary_button" - android:src="@drawable/ic_contact_info" + android:src="@drawable/overflow_thumbnail" android:background="?android:attr/selectableItemBackground" 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:paddingLeft="4dp" + android:paddingRight="4dp" + android:paddingStart="4dp" + android:paddingEnd="4dp" + android:paddingTop="4dp" + android:paddingBottom="4dp" + android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" + android:scaleType="center" android:contentDescription="@string/description_view_contact_detail" /> </RelativeLayout> diff --git a/res/values/colors.xml b/res/values/colors.xml index a8ddf2be7..b2d4bc560 100644 --- a/res/values/colors.xml +++ b/res/values/colors.xml @@ -63,7 +63,7 @@ <color name="searchbox_text_color">#d3d3d3</color> <!-- Color of the contact name in favorite tiles --> - <color name="contact_tile_name_color">#f0f0f0</color> + <color name="contact_tile_name_color">#ffffff</color> <!-- Undo dialogue color --> <color name="undo_dialogue_text_color">#4d4d4d</color> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 17439521b..53d9c47e5 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -63,10 +63,11 @@ <dimen name="fake_menu_button_min_width">56dp</dimen> <!-- Favorites tile and recent call log padding --> - <dimen name="contact_tile_divider_padding">3dp</dimen> + <dimen name="contact_tile_divider_width">12dp</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> + <item name="contact_tile_height_to_width_ratio" type="dimen">67%</item> + <dimen name="favorites_row_top_padding">6dp</dimen> + <dimen name="favorites_row_bottom_padding">6dp</dimen> <dimen name="favorites_row_start_padding">8dp</dimen> <dimen name="favorites_row_end_padding">8dp</dimen> <dimen name="favorites_row_undo_text_side_padding">32dp</dimen> |