use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindNickname.
protected DataKind addDataKindNickname(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(Nickname.CONTENT_ITEM_TYPE, R.string.nicknameLabelsGroup, Weight.NICKNAME, true));
kind.typeOverallMax = 1;
kind.actionHeader = new SimpleInflater(R.string.nicknameLabelsGroup);
kind.actionBody = new SimpleInflater(Nickname.NAME);
kind.defaultValues = new ContentValues();
kind.defaultValues.put(Nickname.TYPE, Nickname.TYPE_DEFAULT);
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Nickname.NAME, R.string.nicknameLabelsGroup, FLAGS_PERSON_NAME));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindPhoneticName.
protected DataKind addDataKindPhoneticName(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(DataKind.PSEUDO_MIME_TYPE_PHONETIC_NAME, R.string.name_phonetic, Weight.NONE, true));
kind.actionHeader = new SimpleInflater(R.string.nameLabelsGroup);
kind.actionBody = new SimpleInflater(Nickname.NAME);
kind.typeOverallMax = 1;
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(DataKind.PSEUDO_COLUMN_PHONETIC_NAME, R.string.name_phonetic, FLAGS_PHONETIC).setShortForm(true));
kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME, R.string.name_phonetic_family, FLAGS_PHONETIC).setLongForm(true));
kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME, R.string.name_phonetic_middle, FLAGS_PHONETIC).setLongForm(true));
kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME, R.string.name_phonetic_given, FLAGS_PHONETIC).setLongForm(true));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindStructuredName.
protected DataKind addDataKindStructuredName(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(StructuredName.CONTENT_ITEM_TYPE, R.string.nameLabelsGroup, Weight.NONE, true));
kind.actionHeader = new SimpleInflater(R.string.nameLabelsGroup);
kind.actionBody = new SimpleInflater(Nickname.NAME);
kind.typeOverallMax = 1;
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(StructuredName.DISPLAY_NAME, R.string.full_name, FLAGS_PERSON_NAME));
kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix, FLAGS_PERSON_NAME).setLongForm(true));
kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME, R.string.name_family, FLAGS_PERSON_NAME).setLongForm(true));
kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME, R.string.name_middle, FLAGS_PERSON_NAME).setLongForm(true));
kind.fieldList.add(new EditField(StructuredName.GIVEN_NAME, R.string.name_given, FLAGS_PERSON_NAME).setLongForm(true));
kind.fieldList.add(new EditField(StructuredName.SUFFIX, R.string.name_suffix, FLAGS_PERSON_NAME).setLongForm(true));
kind.fieldList.add(new EditField(StructuredName.PHONETIC_FAMILY_NAME, R.string.name_phonetic_family, FLAGS_PHONETIC));
kind.fieldList.add(new EditField(StructuredName.PHONETIC_MIDDLE_NAME, R.string.name_phonetic_middle, FLAGS_PHONETIC));
kind.fieldList.add(new EditField(StructuredName.PHONETIC_GIVEN_NAME, R.string.name_phonetic_given, FLAGS_PHONETIC));
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindGroupMembership.
protected DataKind addDataKindGroupMembership(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(GroupMembership.CONTENT_ITEM_TYPE, R.string.groupsLabel, Weight.GROUP_MEMBERSHIP, true));
kind.typeOverallMax = 1;
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(GroupMembership.GROUP_ROW_ID, -1, -1));
kind.maxLinesForDisplay = MAX_LINES_FOR_GROUP;
return kind;
}
use of com.android.contacts.common.model.dataitem.DataKind in project android_packages_apps_Dialer by LineageOS.
the class BaseAccountType method addDataKindPhoto.
protected DataKind addDataKindPhoto(Context context) throws DefinitionException {
DataKind kind = addKind(new DataKind(Photo.CONTENT_ITEM_TYPE, -1, Weight.NONE, true));
kind.typeOverallMax = 1;
kind.fieldList = new ArrayList<>();
kind.fieldList.add(new EditField(Photo.PHOTO, -1, -1));
return kind;
}
Aggregations