summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/list/PhoneFavoriteListView.java
AgeCommit message (Collapse)Author
2014-09-23Drag and drop for PhoneFavoriteTileView but not when dialpad is openNancy Chen
Drag actions were disabled for PhoneFavoriteTileView when fixing a bug that caused dragging when the dialpad was up. This CL restores the original functionality while fixing the dialpad bug. Bug: 17626737 Change-Id: I3a352088ff44c81230677d771479e367c9fe7856
2014-09-09Fix drag events transfering through dialpadYorke Lee
Ignore drag events sent by the dialpad's EditText Bug: 17375188 Change-Id: Ia2f83ee1c1b2f59a54bd226c44f28609d2bc195e
2014-08-26Revert "Fix IllegalStateException in Dialer"Yorke Lee
This reverts commit 94762c39403e4b49aefa8f49620b4a6bc2e675b3. Underlying ART bug has been fixed, so we don't need this anymore. Bug: 16862804 Change-Id: I205390bfc4fda3b8dcdf48ef99a0d1c4144c2802
2014-08-07Fix IllegalStateException in DialerYorke Lee
Bug: 16862804 Change-Id: Ifa16032686547bb2df213c9155662d0e85b72d49
2014-05-07Make drag shadow work across entire layoutYorke Lee
Move drag shadow view into main layout so that it can be drawn over all other views. Also offset it accordingly based on its parent's X/Y coordinates Bug: 14393052 Change-Id: I957469cf505d30812b539517d2aeab3f72a733ca
2014-05-06Refactor drag and drop to work for entire Dialer layoutYorke Lee
Add a drag listener to the main dialer layout and manipulate drag events correctly in DragDropController so that drag and drop works throughout the main Dialer layout, rather than just the speed dial fragment. Also shift the remove view into dialtacts_mainlayout so that it can continue receiving drag events. Bug: 14393052 Change-Id: I90c26fee4fe681d0e237aa490185e850628e4cd0
2014-04-21Use PhoneFavoritesTileAdapter directly in GridViewYorke Lee
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
2014-03-24Remove layout and logic for unused non-tiled favoritesYorke Lee
Change-Id: I26caea4e47da8ae8420ef35e8006ee3f968d0630
2014-03-20Remove deprecated swipe to remove codeYorke Lee
Change-Id: I83b286db71f3ae2df3a31bbfc66c0045faa8f5ef
2014-03-19Speed up scroll speed when draggingYorke Lee
Bug: 13535481 Change-Id: Idced6f7afe310a43dc8ddd3bc5bb55cba108c0de
2014-02-20Add drag to remove for favorites in DialerYorke Lee
* 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
2013-10-01Fix crash when dragging a contact to searchboxYorke Lee
Also fix drag handling so that dropping outside the listview will also complete the drag animation. Bug: 11017468 Change-Id: I968cc8463e9d567b0a8c62f851c067d589571c6d
2013-09-30Fix flicker when long pressing to drag and dropYorke Lee
Initial creation of drag shadow now uses the same layout logic as drag hovering so that the shadow does not jump upon first creation. Removed setPressed from onLongClick listener to avoid toggling of pressed state when drag was started. Bug: 10991974 Change-Id: I186cd62060e3a79913aa89fb7af989f3497e0b10
2013-09-28Merge "Fix relayout requests when dragging" into klp-devYorke Lee
2013-09-27Fix relayout requests when draggingYorke Lee
Also removed unneeded legacy code that shows the keyboard when the search view is focused. The framework does that automatically for us, and this code was causing problems by popping up the keyboard whenever you dragged a contact over the search view. Also turned off debug flag. Bug: 10965693 Change-Id: I2fb9cedecd2a78faa367f750f8a0aea9de68a359
2013-09-27Disable drag and drop if the undo dialog for a favorite is showingYorke Lee
Bug: 10955634 Change-Id: I1a562a03aa7a7de016687803c154b6a3915e3e10
2013-09-19Smooth drag and drop scrollingHongwei Wang
Bug: 10686781 Change-Id: I4435b5b1087c132d1f94978489cdacac1ac519f3
2013-09-16Crossfade when drop to the positionHongwei Wang
Bug: 10686781 Change-Id: I8e5546b1eb8f914054e9525e8d763928d35836a8
2013-09-16Refactor Drag ShadowHongwei Wang
Bug: 10759985 Bug: 10686781 Change-Id: I8f6446ffe1e882c39c38e61c21a60561d91d1e2e
2013-09-13Refactor the D-N-D, let list view handle all the eventsHongwei Wang
Bug: 10686781 By moving the Drag and Drop logic to the list view, it helps - Making the code more readable - Making it feasible to control the drag shadow and animating more easily Change-Id: Ia30ea2d9379c1823ff056360fdcb8faadca553e8
2013-09-13Realtime drop areaHongwei Wang
Bug: 10686781 Improved also the scroll on drag-n-drop and NOTE ALSO - The animations are not in, neither the lift up nor drop in - Pos >= 20 is not draggable, nor droppable - The implementation of D-N-D may need a refactor - The refactor will use the ListView as the only D-N-D handler - The refactor will remove the drag handleer from individual row - The refactor will make it possible to do animation on the drag shadow Change-Id: Ic7c81a9a139eb46ef1820192528da14e5d8e52cb
2013-09-11Support drag & drop across "pages" of the favorites listHongwei Wang
Bug: 10691029 Change-Id: I054f564229ee0ca848f8df84f9a4ab34c3e45265