Loading res/values/strings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -882,4 +882,12 @@ <!-- Message below contact name, showing from which account [CHAR LIMIT=NONE]--> <string name="contact_from_account_name">From <xliff:g id="account_name">%s</xliff:g></string> <!-- Content description of delete button to the right of each section in editor, including data type. For example: Delete Home Phone, Delete Work Email, etc [CHAR LIMIT=30]--> <string name="editor_delete_view_description">Delete <xliff:g id="data_type">%s </xliff:g><xliff:g id="data_kind">%s</xliff:g></string> <!-- Content description of delete button to the right of each section in editor, without data type. For example: Delete Website, Delete SIP, etc [CHAR LIMIT=30]--> <string name="editor_delete_view_description_short">Delete <xliff:g id="data_kind">%s</xliff:g></string> </resources> src/com/android/contacts/editor/LabeledEditorView.java +17 −0 Original line number Diff line number Diff line Loading @@ -308,8 +308,23 @@ public abstract class LabeledEditorView extends LinearLayout implements Editor, mLabel.setAdapter(mEditTypeAdapter); if (mEditTypeAdapter.hasCustomSelection()) { mLabel.setSelection(mEditTypeAdapter.getPosition(CUSTOM_SELECTION)); mDeleteContainer.setContentDescription( getContext().getString(R.string.editor_delete_view_description, mEntry.getAsString(mType.customColumn), getContext().getString(mKind.titleRes))); } else { mLabel.setSelection(mEditTypeAdapter.getPosition(mType)); if (mType != null) { mDeleteContainer.setContentDescription( getContext().getString(R.string.editor_delete_view_description, getContext().getString(mType.labelRes), getContext().getString(mKind.titleRes))); } else { mDeleteContainer.setContentDescription( getContext().getString(R.string.editor_delete_view_description_short, getContext().getString(mKind.titleRes))); } } } Loading Loading @@ -404,6 +419,8 @@ public abstract class LabeledEditorView extends LinearLayout implements Editor, final boolean hasTypes = RawContactModifier.hasEditTypes(kind); setupLabelButton(hasTypes); mLabel.setEnabled(!readOnly && isEnabled()); mLabel.setContentDescription(getContext().getResources().getString(mKind.titleRes)); if (hasTypes) { mType = RawContactModifier.getCurrentType(entry, kind); rebuildLabel(); Loading Loading
res/values/strings.xml +8 −0 Original line number Diff line number Diff line Loading @@ -882,4 +882,12 @@ <!-- Message below contact name, showing from which account [CHAR LIMIT=NONE]--> <string name="contact_from_account_name">From <xliff:g id="account_name">%s</xliff:g></string> <!-- Content description of delete button to the right of each section in editor, including data type. For example: Delete Home Phone, Delete Work Email, etc [CHAR LIMIT=30]--> <string name="editor_delete_view_description">Delete <xliff:g id="data_type">%s </xliff:g><xliff:g id="data_kind">%s</xliff:g></string> <!-- Content description of delete button to the right of each section in editor, without data type. For example: Delete Website, Delete SIP, etc [CHAR LIMIT=30]--> <string name="editor_delete_view_description_short">Delete <xliff:g id="data_kind">%s</xliff:g></string> </resources>
src/com/android/contacts/editor/LabeledEditorView.java +17 −0 Original line number Diff line number Diff line Loading @@ -308,8 +308,23 @@ public abstract class LabeledEditorView extends LinearLayout implements Editor, mLabel.setAdapter(mEditTypeAdapter); if (mEditTypeAdapter.hasCustomSelection()) { mLabel.setSelection(mEditTypeAdapter.getPosition(CUSTOM_SELECTION)); mDeleteContainer.setContentDescription( getContext().getString(R.string.editor_delete_view_description, mEntry.getAsString(mType.customColumn), getContext().getString(mKind.titleRes))); } else { mLabel.setSelection(mEditTypeAdapter.getPosition(mType)); if (mType != null) { mDeleteContainer.setContentDescription( getContext().getString(R.string.editor_delete_view_description, getContext().getString(mType.labelRes), getContext().getString(mKind.titleRes))); } else { mDeleteContainer.setContentDescription( getContext().getString(R.string.editor_delete_view_description_short, getContext().getString(mKind.titleRes))); } } } Loading Loading @@ -404,6 +419,8 @@ public abstract class LabeledEditorView extends LinearLayout implements Editor, final boolean hasTypes = RawContactModifier.hasEditTypes(kind); setupLabelButton(hasTypes); mLabel.setEnabled(!readOnly && isEnabled()); mLabel.setContentDescription(getContext().getResources().getString(mKind.titleRes)); if (hasTypes) { mType = RawContactModifier.getCurrentType(entry, kind); rebuildLabel(); Loading