diff options
author | yoichi kakimoto <youichi.kakimoto.gt@kyocera.jp> | 2017-09-04 19:20:13 +0900 |
---|---|---|
committer | yoichi kakimoto <youichi.kakimoto.gt@kyocera.jp> | 2017-09-11 09:11:47 +0900 |
commit | 5ed462afae8eb162473fe2fbd02ae60e7c73c676 (patch) | |
tree | e7ffdbb318ec5d0853745933c3746b6b374f49af /src/com/android/contacts/editor/ContactEditorFragment.java | |
parent | a33aca875ae2135e720385d07d637cf8819c7f8a (diff) | |
download | packages_apps_Contacts-5ed462afae8eb162473fe2fbd02ae60e7c73c676.tar.gz packages_apps_Contacts-5ed462afae8eb162473fe2fbd02ae60e7c73c676.tar.bz2 packages_apps_Contacts-5ed462afae8eb162473fe2fbd02ae60e7c73c676.zip |
Fixed to Added the function to add the Phonetic name into Phonetic field automaticaly.
This fix is to add the Phonetic name automatically to Phonetic name field when user inputs a Name in Japanese language mode.
Enter in the name field and automatically enter to Phonetic field when the input charactor is confirmed.
The cases that will be entered to the Phonetic field are as follows.
1. Select enter on the keyboard
2. Select for prediction conversion candidate
3. Tap outside the input field.
Change-Id: I6a04a971814a1e84cd2db7acc5d7c80c1ca79074
Signed-off-by: yoichi kakimoto <youichi.kakimoto.gt@kyocera.jp>
Diffstat (limited to 'src/com/android/contacts/editor/ContactEditorFragment.java')
-rw-r--r-- | src/com/android/contacts/editor/ContactEditorFragment.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/android/contacts/editor/ContactEditorFragment.java b/src/com/android/contacts/editor/ContactEditorFragment.java index da68ec6a5..ccb3ff941 100644 --- a/src/com/android/contacts/editor/ContactEditorFragment.java +++ b/src/com/android/contacts/editor/ContactEditorFragment.java @@ -52,6 +52,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.BaseAdapter; +import android.widget.EditText; import android.widget.LinearLayout; import android.widget.ListPopupWindow; import android.widget.Toast; @@ -100,6 +101,7 @@ import java.util.Collections; import java.util.HashSet; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.Set; /** @@ -1277,6 +1279,13 @@ public class ContactEditorFragment extends Fragment implements if (uri != null) { editorView.setFullSizePhoto(uri); } + final StructuredNameEditorView nameEditor = editorView.getNameEditorView(); + final TextFieldsEditorView phoneticNameEditor = editorView.getPhoneticEditorView(); + final boolean useJapaneseOrder = + Locale.JAPANESE.getLanguage().equals(Locale.getDefault().getLanguage()); + if (useJapaneseOrder && nameEditor != null && phoneticNameEditor != null) { + nameEditor.setPhoneticView(phoneticNameEditor); + } // The editor is ready now so make it visible editorView.setEnabled(mEnabled); |