History log of /packages/apps/Dialer/src/com/android/dialer/list/OnDragDropListener.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
efb2d9c2e32ca4ed434ff785c4b3d18c9e08db6d 18-Apr-2014 Yorke Lee <yorkelee@google.com> 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
/packages/apps/Dialer/src/com/android/dialer/list/OnDragDropListener.java
3cefcc69c10ab12bd782a0b53779dbd1cc0e2aa1 16-Jan-2014 Yorke Lee <yorkelee@google.com> Add drag to remove for favorites in Dialer

* Add remove view in dialtacts_activity.xml, and rearrange layout slightly
so that it takes up the same position in the layout as the search view
container. Contacts that are dragged to this remove view will be unstarred
and unpinned.

* Add drag event logic to the Remove View, so that when the user hovers a
contact over it, the UI will continue to respond. Previously, only the
PhoneFavoritesListView would detect touch events.

* Refactor DragDropController and OnDragDropListener into separate classes.
DragDropController performs the work of receiving drag/drop events from
multiple views, combining them, and then firing off callbacks as appropriate
to OnDragDropListeners. Each OnDragDropListener can then update their UI
or internal data model as necessary in response to the callbacks.

OnDragDropListener <----------------------------------------
^ |
| |
DialtactsActivity ---------------> RemoveView |
| | |
v | | callbacks
PhoneFavoriteListFragment |drag events |
| | |
v v |
PhoneFavoriteListView ------------> DragController--------
drag events |
| callbacks
v
PhoneFavoritesTileAdapter --> OnDragDropListener

* While in here, add a content description for the clear search button
Change-Id: I044ad1c5aa42c7686bde6bf5074095a4fe879bde
/packages/apps/Dialer/src/com/android/dialer/list/OnDragDropListener.java