@Override
 public boolean onStartDrag(int position) {
   // add/delete tile shouldn't be dragged
   if (mDraggableGridView.getChildAt(position) == mAddDeleteTile) {
     return false;
   }
   mDraggingActive = true;
   updateAddDeleteState();
   return true;
 }
  private void updateSettings() {
    ContentResolver resolver = getActivity().getContentResolver();
    StringBuilder tiles = new StringBuilder();

    // Add every tile except the last one (Add / Delete) to the list
    for (int i = 0; i < mDraggableGridView.getChildCount(); i++) {
      String type = (String) mDraggableGridView.getChildAt(i).getTag();
      if (!TextUtils.isEmpty(type)) {
        if (tiles.length() > 0) {
          tiles.append(",");
        }
        tiles.append(type);
      }
    }

    Settings.Secure.putString(resolver, Settings.Secure.QS_TILES, tiles.toString());
  }