title: Android Drag-n-Drop grid with LinearLayouts as drag items
body: <p>I have a working example of a grid that allows items to be reordered using long touches to active a drag-n-drop.  All is working well if the items are simple Views e.g. <code>TextView</code> or <code>ImageView</code> but if the items are <code>LinearLayouts</code> only the layout itself is displayed.</p>
  
  <p>I've been using Tom Quinsn's grid (thanks Tom!!!) from this posting:</p>
  
  <p><a href="https://stackoverflow.com/questions/7365078/android-gridview-drag-and-drop-example">Android Gridview drag and drop example</a></p>
  
  <p>I can get <code>LinearLayouts</code> to work if I derive my own <code>LinearLayout</code> class and override <code>onLayout()</code>, but this forces me to hardcode the positions of the child controls in the layout within this function.  </p>
  
  <p>Ideally I would like to be able to define the item layout within an XML file and inflate them before adding them to the Control that handles the grid.  I'm guessing that for some reason the framework is not calling the layout function for the children contained within the <code>DraggableGridView</code> view as defined in Tom's code but I can't understand why that is.</p>