diff options
author | Chiao Cheng <chiaocheng@google.com> | 2012-09-13 13:06:23 -0700 |
---|---|---|
committer | Chiao Cheng <chiaocheng@google.com> | 2013-01-15 11:37:55 -0800 |
commit | 44cfc56d1701629070384364416c1311b780535d (patch) | |
tree | dc1241fe3278e431acb14b734f8d94526b614b4a /src/com/android/contacts/editor/StructuredNameEditorView.java | |
parent | d683b541718154aa73ce3a304acd2cd3665a6737 (diff) | |
download | packages_apps_Contacts-44cfc56d1701629070384364416c1311b780535d.tar.gz packages_apps_Contacts-44cfc56d1701629070384364416c1311b780535d.tar.bz2 packages_apps_Contacts-44cfc56d1701629070384364416c1311b780535d.zip |
Allow read-only contacts to be editable.
- Automatically create new raw contact when editing a read-only contact.
- Refactored mState to be always initialized.
- Allow RawContactDeltaList to be instantiated with empty constructor.
Bug: 6406182
Change-Id: I7a58625485dae6957b4f9bcc446122f54551afa1
Diffstat (limited to 'src/com/android/contacts/editor/StructuredNameEditorView.java')
-rw-r--r-- | src/com/android/contacts/editor/StructuredNameEditorView.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/android/contacts/editor/StructuredNameEditorView.java b/src/com/android/contacts/editor/StructuredNameEditorView.java index f7090212c..4d7259857 100644 --- a/src/com/android/contacts/editor/StructuredNameEditorView.java +++ b/src/com/android/contacts/editor/StructuredNameEditorView.java @@ -200,6 +200,18 @@ public class StructuredNameEditorView extends TextFieldsEditorView { } } + /** + * Set the display name onto the text field directly. This does not affect the underlying + * data structure so it is similar to the user typing the value in on the field directly. + * + * @param name The name to set on the text field. + */ + public void setDisplayName(String name) { + // For now, assume the first text field is the name. + // TODO: Find a better way to get a hold of the name field. + super.setValue(0, name); + } + @Override protected Parcelable onSaveInstanceState() { SavedState state = new SavedState(super.onSaveInstanceState()); |