diff options
author | Gilles Debunne <debunne@google.com> | 2011-11-30 15:45:28 -0800 |
---|---|---|
committer | Gilles Debunne <debunne@google.com> | 2011-11-30 15:45:30 -0800 |
commit | 647944897fecf2d14bf8140638be9141f4dc1432 (patch) | |
tree | a62f6c7e078c5fcd95d0265dba8d7a1e620c80f9 | |
parent | 8bfcd133a2a326d3fddb87834fedb1cf18edc59f (diff) | |
download | frameworks_base-647944897fecf2d14bf8140638be9141f4dc1432.zip frameworks_base-647944897fecf2d14bf8140638be9141f4dc1432.tar.gz frameworks_base-647944897fecf2d14bf8140638be9141f4dc1432.tar.bz2 |
TextViews keep focus after Done
Otherwise the ViewRoot tries to focus something else and as a result
it will scroll back to the top of a form with many fields, which is
annoying.
Change-Id: I1de10f76fe4b82bc4097fc13c629450d6f999fd0
-rw-r--r-- | core/java/android/widget/TextView.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index 060fb24..cbd0808 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -3785,7 +3785,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return; } } - + // This is the handling for some default action. // Note that for backwards compatibility we don't do this // default handling if explicit ime options have not been given, @@ -3816,7 +3816,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener if (imm != null && imm.isActive(this)) { imm.hideSoftInputFromWindow(getWindowToken(), 0); } - clearFocus(); return; } } @@ -3838,7 +3837,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener | KeyEvent.FLAG_EDITOR_ACTION))); } } - + /** * Set the private content type of the text, which is the * {@link EditorInfo#privateImeOptions EditorInfo.privateImeOptions} |