summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/list/PhoneFavoriteTileView.java
diff options
context:
space:
mode:
authorHongwei Wang <hwwang@google.com>2013-09-11 17:50:30 -0700
committerHongwei Wang <hwwang@google.com>2013-09-13 16:55:08 -0700
commit72418af9f84b7a97ff8cb08b99aa68b2db9ee1a9 (patch)
treeff046c14d0d53cadd1150ce33599128fc48cb2e1 /src/com/android/dialer/list/PhoneFavoriteTileView.java
parent42d49517b46c5b4ba6285d5d7bfd80b1a7b4add3 (diff)
Realtime drop area
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
Diffstat (limited to 'src/com/android/dialer/list/PhoneFavoriteTileView.java')
-rw-r--r--src/com/android/dialer/list/PhoneFavoriteTileView.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/dialer/list/PhoneFavoriteTileView.java b/src/com/android/dialer/list/PhoneFavoriteTileView.java
index 43dbad347..76a0e352b 100644
--- a/src/com/android/dialer/list/PhoneFavoriteTileView.java
+++ b/src/com/android/dialer/list/PhoneFavoriteTileView.java
@@ -99,7 +99,11 @@ public abstract class PhoneFavoriteTileView extends ContactTileView {
// If the view is regular row, start drag the row view.
final View.DragShadowBuilder shadowBuilder =
new View.DragShadowBuilder(view.getParentRow());
- view.getParentRow().startDrag(data, shadowBuilder, null, 0);
+ final ContactTileRow parent = (ContactTileRow) view.getParentRow();
+ // Drag is not available for the item exceeds the PIN_LIMIT.
+ if (parent.getRegularRowItemIndex() < PhoneFavoritesTileAdapter.PIN_LIMIT) {
+ view.getParentRow().startDrag(data, shadowBuilder, null, 0);
+ }
} else {
// If the view is a tile view, start drag the tile.
final View.DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);