protected void onTypeSelectionChange(int position) {
    EditType selected = mEditTypeAdapter.getItem(position);
    // See if the selection has in fact changed
    if (mEditTypeAdapter.hasCustomSelection() && selected == CUSTOM_SELECTION) {
      return;
    }

    if (mType == selected && mType.customColumn == null) {
      return;
    }

    if (selected.customColumn != null) {
      showDialog(DIALOG_ID_CUSTOM);
    } else {
      // User picked type, and we're sure it's ok to actually write the entry.
      mType = selected;
      mEntry.put(mKind.typeColumn, mType.rawValue);
      rebuildLabel();
      requestFocusForFirstEditField();
      onLabelRebuilt();
    }
  }