diff options
author | Yorke Lee <yorkelee@google.com> | 2014-04-18 14:05:01 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2014-04-21 15:27:32 -0700 |
commit | efb2d9c2e32ca4ed434ff785c4b3d18c9e08db6d (patch) | |
tree | ce2311920dedaebf8abaa33f139e21502ffd4c5b /res | |
parent | 93dcef71c7ea7a99ef4067ab3dea79a263b9613b (diff) |
Use PhoneFavoritesTileAdapter directly in GridView
This CL moves the adapter that contains the speed dial contacts into
its own GridView that lives in PhoneFavoritesFragment. This is the
first step to splitting up PhoneFavoritesMergedAdapter into
a list of shortcuts and a grid of contacts, and also get rid of the
convoluted ContactTileRow logic within PhoneFavoritesTileAdapter, to
facilitate a future transition to RecyclerView.
* PhoneFavoritesTileAdapter now directly returns PhoneFavoriteTileViews
rather than ContactTileRows.
* Deleted a lot of unnecessary complicated logic within
PhoneFavoritesTileAdapter that had to do with ContactTileRows.
* Simplified and rewrote animation logic so that animations now perform
as expected within the GridView. In the future this may not be necessary
if RecyclerView is used.
* Rewrote layout/measurement logic for PhoneFavoriteTileView. It now
determines its height directly based on what its measured width is.
* Replaced PhoneFavoritesListView in PhoneFavoriteFragment with a
standard GridView
* Delete stale PhoneFavoriteTileAdapter tests
Notes:
Call shortcut cards are now temporarily missing due to this change
Bug: 13963734
Bug: 13933092
Bug: 13419223
Change-Id: I71e8970667589e4024d00e9af2c8b45c843c5db1
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/phone_favorite_tile_view.xml | 3 | ||||
-rw-r--r-- | res/layout/phone_favorites_fragment.xml | 8 | ||||
-rw-r--r-- | res/values/dimens.xml | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/res/layout/phone_favorite_tile_view.xml b/res/layout/phone_favorite_tile_view.xml index 8a9484412..0050cefd1 100644 --- a/res/layout/phone_favorite_tile_view.xml +++ b/res/layout/phone_favorite_tile_view.xml @@ -16,7 +16,8 @@ <view xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/contact_tile" - class="com.android.dialer.list.PhoneFavoriteSquareTileView" > + class="com.android.dialer.list.PhoneFavoriteSquareTileView" + android:paddingEnd="@dimen/contact_tile_divider_width"> <RelativeLayout android:id="@+id/contact_favorite_card" diff --git a/res/layout/phone_favorites_fragment.xml b/res/layout/phone_favorites_fragment.xml index 7a1f05ae6..5e9e3bbb2 100644 --- a/res/layout/phone_favorites_fragment.xml +++ b/res/layout/phone_favorites_fragment.xml @@ -29,12 +29,13 @@ android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentLeft="true" - > - + android:paddingStart="@dimen/favorites_row_start_padding" + android:paddingEnd="@dimen/favorites_row_end_padding" > <com.android.dialer.list.PhoneFavoriteListView android:id="@+id/contact_tile_list" android:layout_width="match_parent" android:layout_height="match_parent" + android:numColumns="@integer/contact_tile_column_count_in_favorites" android:clipToPadding="false" android:fadingEdge="none" android:divider="@null" /> @@ -43,7 +44,8 @@ android:id="@+id/contact_tile_drag_shadow_overlay" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:visibility="gone"/> + android:visibility="gone" + android:importantForAccessibility="no" /> </FrameLayout> <include diff --git a/res/values/dimens.xml b/res/values/dimens.xml index f113ac017..496eb433d 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -64,7 +64,7 @@ <dimen name="call_button_height">74dp</dimen> <dimen name="fake_action_bar_height">60dp</dimen> - <!-- Min with of fake menu buttons, which should be same as ActionBar's one --> + <!-- 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 --> @@ -76,7 +76,8 @@ <dimen name="favorites_row_top_padding">1dp</dimen> <dimen name="favorites_row_bottom_padding">0dp</dimen> <dimen name="favorites_row_start_padding">1dp</dimen> - <dimen name="favorites_row_end_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> <dimen name="recent_call_log_item_padding">8dp</dimen> <!-- Size of the star icon on the favorites tile. --> |