Fix bug 5494702 - Text editing options not visible in custom label dialog
Use the correct context for creating the EditText field for use in the
custom label dialog.
Change-Id: I8c82fe53f0813aeed118c834eb208cb338fcbabb
diff --git a/src/com/android/contacts/editor/LabeledEditorView.java b/src/com/android/contacts/editor/LabeledEditorView.java
index ff0af6f..2a1ec5e 100644
--- a/src/com/android/contacts/editor/LabeledEditorView.java
+++ b/src/com/android/contacts/editor/LabeledEditorView.java
@@ -364,14 +364,15 @@
* no empty text is allowed in any custom label.
*/
private Dialog createCustomDialog() {
- final EditText customType = new EditText(mContext);
+ final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
+ builder.setTitle(R.string.customLabelPickerTitle);
+
+ final EditText customType = new EditText(builder.getContext());
customType.setId(R.id.custom_dialog_content);
customType.setInputType(INPUT_TYPE_CUSTOM);
customType.setSaveEnabled(true);
customType.requestFocus();
- final AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
- builder.setTitle(R.string.customLabelPickerTitle);
builder.setView(customType);
builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {