diff options
| author | Mihai Popa <popam@google.com> | 2018-05-17 16:42:22 +0100 |
|---|---|---|
| committer | Mihai Popa <popam@google.com> | 2018-05-17 16:42:22 +0100 |
| commit | 5b3a42319c20929a075a71de92fa8b7cdafd0ae8 (patch) | |
| tree | 6e4dfe796f7cf3000a545bfb6ffa1527c7013955 /core/java/android/widget/TextView.java | |
| parent | 1119ef3ba4af37b0eb6c9a04d5d36248e2ceaabe (diff) | |
Fix TextView#setText misplaced documentation
In Ifaddb46d156c495a371789c6f32cfd67ffaaaef2, we improved the
documentation of TextView#setText to state an assumption that should
hold when subclasses override the method. However, the new phrase was
put in the wrong place. This CL fixes this.
Bug: none
Test: none
Change-Id: I918a6c533b9e4b34b3977a20e979a10db9741ebc
Diffstat (limited to 'core/java/android/widget/TextView.java')
| -rw-r--r-- | core/java/android/widget/TextView.java | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index a538f7fa3c87..9bdd76bcdcc8 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -5547,11 +5547,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * PrecomputedText mismatches with this TextView, IllegalArgumentException is thrown. To ensure * the parameters match, you can call {@link TextView#setTextMetricsParams} before calling this. * - * Subclasses overriding this method should ensure that the following post condition holds, - * in order to guarantee the safety of the view's measurement and layout operations: - * regardless of the input, after calling #setText both {@code mText} and {@code mTransformed} - * will be different from {@code null}. - * * @param text text to be displayed * * @attr ref android.R.styleable#TextView_text @@ -5574,11 +5569,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * {@link android.text.Editable.Factory} to create final or intermediate * {@link Editable Editables}. * - * Subclasses overriding this method should ensure that the following post condition holds, - * in order to guarantee the safety of the view's measurement and layout operations: - * regardless of the input, after calling #setText both {@code mText} and {@code mTransformed} - * will be different from {@code null}. - * * @param text text to be displayed * * @see #setText(CharSequence) @@ -5596,6 +5586,11 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * {@link android.text.Editable.Factory} to create final or intermediate * {@link Editable Editables}. * + * Subclasses overriding this method should ensure that the following post condition holds, + * in order to guarantee the safety of the view's measurement and layout operations: + * regardless of the input, after calling #setText both {@code mText} and {@code mTransformed} + * will be different from {@code null}. + * * @param text text to be displayed * @param type a {@link android.widget.TextView.BufferType} which defines whether the text is * stored as a static text, styleable/spannable text, or editable text |
