diff options
author | Sunny Goyal <sunnygoyal@google.com> | 2015-09-25 11:50:16 -0700 |
---|---|---|
committer | Sunny Goyal <sunnygoyal@google.com> | 2015-09-25 11:50:16 -0700 |
commit | 9d4380856ff41ecb26c0d5aee1747b6060d2ef0e (patch) | |
tree | 59f1195b66f6adab842c52e86c3e83688b835a3b /src/com/android/launcher3/CellLayout.java | |
parent | 1f832f85d59600fc4c212dec51a5112a6b7427d5 (diff) | |
parent | e78e3d734b577c1ab6dc0738a83600374908ea52 (diff) | |
download | android_packages_apps_Trebuchet-9d4380856ff41ecb26c0d5aee1747b6060d2ef0e.tar.gz android_packages_apps_Trebuchet-9d4380856ff41ecb26c0d5aee1747b6060d2ef0e.tar.bz2 android_packages_apps_Trebuchet-9d4380856ff41ecb26c0d5aee1747b6060d2ef0e.zip |
resolved conflicts for e78e3d73 to ub-launcher3-master
Change-Id: Idc119a57e21cf6016ee0fd91866839301db072d6
Diffstat (limited to 'src/com/android/launcher3/CellLayout.java')
-rw-r--r-- | src/com/android/launcher3/CellLayout.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/com/android/launcher3/CellLayout.java b/src/com/android/launcher3/CellLayout.java index b8b41443e..92e4043df 100644 --- a/src/com/android/launcher3/CellLayout.java +++ b/src/com/android/launcher3/CellLayout.java @@ -1042,7 +1042,7 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { } void visualizeDropLocation(View v, Bitmap dragOutline, int originX, int originY, int cellX, - int cellY, int spanX, int spanY, boolean resize, Point dragOffset, Rect dragRegion) { + int cellY, int spanX, int spanY, boolean resize, DropTarget.DragObject dragObject) { final int oldDragCellX = mDragCell[0]; final int oldDragCellY = mDragCell[1]; @@ -1051,6 +1051,9 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { } if (cellX != oldDragCellX || cellY != oldDragCellY) { + Point dragOffset = dragObject.dragView.getDragVisualizeOffset(); + Rect dragRegion = dragObject.dragView.getDragRegion(); + mDragCell[0] = cellX; mDragCell[1] = cellY; @@ -1106,6 +1109,18 @@ public class CellLayout extends ViewGroup implements BubbleTextShadowHandler { Utilities.scaleRectAboutCenter(r, getChildrenScale()); mDragOutlineAnims[mDragOutlineCurrent].setTag(dragOutline); mDragOutlineAnims[mDragOutlineCurrent].animateIn(); + + if (dragObject.stateAnnouncer != null) { + String msg; + if (isHotseat()) { + msg = getContext().getString(R.string.move_to_hotseat_position, + Math.max(cellX, cellY) + 1); + } else { + msg = getContext().getString(R.string.move_to_empty_cell, + cellY + 1, cellX + 1); + } + dragObject.stateAnnouncer.announce(msg); + } } } |