OSDN Git Service

Set focus to field being edited after changing type
authorDaniel Lehmann <lehmannd@google.com>
Sat, 27 Feb 2010 03:10:35 +0000 (19:10 -0800)
committerDaniel Lehmann <lehmannd@google.com>
Sat, 27 Feb 2010 03:10:35 +0000 (19:10 -0800)
Bug: 1382329

Change-Id: Ie0a885175f0dcbddaa9f15f676a118d2cf6d32ad

src/com/android/contacts/ui/widget/GenericEditorView.java

index 40ed5cd..ee5951f 100644 (file)
@@ -290,6 +290,8 @@ public class GenericEditorView extends RelativeLayout implements Editor, View.On
                     mEntry.put(mKind.typeColumn, mType.rawValue);
                     mEntry.put(mType.customColumn, customText);
                     rebuildLabel();
+                    if (!mFields.hasFocus())
+                        mFields.requestFocus();
                 }
             }
         });
@@ -346,6 +348,8 @@ public class GenericEditorView extends RelativeLayout implements Editor, View.On
                     mType = selected;
                     mEntry.put(mKind.typeColumn, mType.rawValue);
                     rebuildLabel();
+                    if (!mFields.hasFocus())
+                        mFields.requestFocus();
                 }
             }
         };