Android-DragController阵列

Android-DragController阵列,android,arrays,adapter,Android,Arrays,Adapter,如何设置用于不同GridView的控制器数组,以便我可以像这样使用它们 private DragController mDragController[]; .. mDragController[1] = new DragController (ManageRooms.this); dynGrid.setAdapter (new ImageCellAdapter (ManageRooms.this, mDragController[1])); 现在它只是使应用程序崩溃。有什么想法吗?缺少这

如何设置用于不同GridView的控制器数组,以便我可以像这样使用它们

private DragController mDragController[]; 
..
 mDragController[1] = new DragController (ManageRooms.this);
 dynGrid.setAdapter (new ImageCellAdapter (ManageRooms.this, mDragController[1]));

现在它只是使应用程序崩溃。有什么想法吗?

缺少这一行:

private DragController[] mDragController = new DragController[numberOfControllers];