title: Scroll gridview while dragging item (as shadow)
body: <p>I am developing for api > 14 and I have implemented drag/drop functionality on a <code>GridView</code>. </p>
  
  <p>However, while dragging items to the top or bottom of the screen the <code>GridView</code> does not scroll.</p>
  
  <p>I would like to have it scroll in the direction you drag an item getting faster as you move to the edge and slow as you move the item back towards the vertical center of the screen.</p>
  
  <p>Surely this sort of functionality should be standard in any drag-n-drop?</p>
  
  <p>Anyway, does anyone know the best way to approach this?</p>
  
  <p><strong>UPDATE</strong>:
  I can't actually find a single example on the internet that even attempts to scroll with a dragged grid item (am I missing something here?) let alone solve my problem. </p>
  
  <p>How do you get the draggable item (that appears as a shadow) to scroll the gridview? I am assigning the drag as follows:</p>
  
  <pre><code>int gridChildPosition = position - mGridView.getFirstVisiblePosition();                     
  ViewFlipper gridItem = (ViewFlipper) mGridView.getChildAt(gridChildPosition);
  
  ClipData data = ClipData.newPlainText("", "");
  DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(gridItem);
  
  if (mGridView.startDrag(data, shadowBuilder, gridItem, 0)) {
  
      int lastVisiblePosition = mGridView.getLastVisiblePosition() - mGridView.getFirstVisiblePosition();
      for (int i=0; i&lt;=lastVisiblePosition; i++) {
          if (i == gridChildPosition) {
              continue;
          }
          mGridView.getChildAt(i).setOnDragListener(new GridItemDragListener(position));
          mGridView.getChildAt(i).setAlpha(0.4f);
      }
  }
  </code></pre>
  
  <p>Above code creates the draggable shadow and all other items currently get dimmed. But I'm unsure how I can get the shadow to scroll the gridview.</p>