1 package com.android.dialer.list; 2 3 4 /** 5 * Classes that want to receive callbacks in response to drag events should implement this 6 * interface. 7 */ 8 public interface OnDragDropListener { 9 /** 10 * Called when a drag is started. 11 * @param itemIndex Index of the contact on which the drag was triggered 12 * @param x X-coordinate of the drag event 13 * @param y Y-coordinate of the drag event 14 * @param view The contact tile which the drag was started on 15 */ 16 public void onDragStarted(int itemIndex, int x, int y, PhoneFavoriteTileView view); 17 18 /** 19 * Called when a drag is in progress and the user moves the dragged contact to a 20 * location. 21 * @param itemIndex Index of the contact in the ListView which is currently being displaced 22 * by the dragged contact 23 * @param x X-coordinate of the drag event 24 * @param y Y-coordinate of the drag event 25 */ 26 public void onDragHovered(int itemIndex, int x, int y); 27 28 /** 29 * Called when a drag is completed (whether by dropping it somewhere or simply by dragging 30 * the contact off the screen) 31 * @param x X-coordinate of the drag event 32 * @param y Y-coordinate of the drag event 33 */ 34 public void onDragFinished(int x, int y); 35 36 /** 37 * Called when a contact has been dropped on the remove view, indicating that the user 38 * wants to remove this contact. 39 */ 40 public void onDroppedOnRemove(); 41 }