Loading core/java/android/widget/TextView.java +19 −2 Original line number Diff line number Diff line Loading @@ -944,6 +944,22 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener setTypeface(tf, styleIndex); } @Override public void setEnabled(boolean enabled) { if (enabled == isEnabled()) { return; } if (!enabled) { // Hide the soft input if the currently active TextView is disabled InputMethodManager imm = InputMethodManager.peekInstance(); if (imm != null && imm.isActive(this)) { imm.hideSoftInputFromWindow(getWindowToken(), 0); } } super.setEnabled(enabled); } /** * Sets the typeface and style in which the text should be displayed, * and turns on the fake bold and italic bits in the Paint if the Loading Loading @@ -4436,7 +4452,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override public InputConnection onCreateInputConnection(EditorInfo outAttrs) { if (onCheckIsTextEditor()) { if (onCheckIsTextEditor() && isEnabled()) { if (mInputMethodState == null) { mInputMethodState = new InputMethodState(); } Loading Loading @@ -6575,7 +6591,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return superResult; } if ((mMovement != null || onCheckIsTextEditor()) && mText instanceof Spannable && mLayout != null) { if ((mMovement != null || onCheckIsTextEditor()) && isEnabled() && mText instanceof Spannable && mLayout != null) { boolean handled = false; Loading Loading
core/java/android/widget/TextView.java +19 −2 Original line number Diff line number Diff line Loading @@ -944,6 +944,22 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener setTypeface(tf, styleIndex); } @Override public void setEnabled(boolean enabled) { if (enabled == isEnabled()) { return; } if (!enabled) { // Hide the soft input if the currently active TextView is disabled InputMethodManager imm = InputMethodManager.peekInstance(); if (imm != null && imm.isActive(this)) { imm.hideSoftInputFromWindow(getWindowToken(), 0); } } super.setEnabled(enabled); } /** * Sets the typeface and style in which the text should be displayed, * and turns on the fake bold and italic bits in the Paint if the Loading Loading @@ -4436,7 +4452,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } @Override public InputConnection onCreateInputConnection(EditorInfo outAttrs) { if (onCheckIsTextEditor()) { if (onCheckIsTextEditor() && isEnabled()) { if (mInputMethodState == null) { mInputMethodState = new InputMethodState(); } Loading Loading @@ -6575,7 +6591,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener return superResult; } if ((mMovement != null || onCheckIsTextEditor()) && mText instanceof Spannable && mLayout != null) { if ((mMovement != null || onCheckIsTextEditor()) && isEnabled() && mText instanceof Spannable && mLayout != null) { boolean handled = false; Loading