summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2022-06-09 06:21:25 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-06-09 06:21:25 +0000
commit6ff694f3ccbe96ae4f67f18cd48db156a9d9d39a (patch)
tree9f287cb0b78352dd74ebcd01ade8679000037c54
parentf9863ba917ec57e89f434253d14a0e5af39ca98a (diff)
parent2b868683ad1acff45b7bd06407dcdc7555f48c73 (diff)
Merge "Explain the difference between setBreakStragegy() and setLineBreakStyle() in API doc" into tm-dev am: 2b868683ad
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18769766 Change-Id: If473607c0c66734e62805e398be3fee2a1f08558 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--core/java/android/widget/TextView.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index e745b8cf769b..23393ffe885c 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4781,12 +4781,19 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
* TextView is {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}, and the default value for
* EditText is {@link Layout#BREAK_STRATEGY_SIMPLE}, the latter to avoid the
* text "dancing" when being edited.
- * <p/>
+ * <p>
* Enabling hyphenation with either using {@link Layout#HYPHENATION_FREQUENCY_NORMAL} or
* {@link Layout#HYPHENATION_FREQUENCY_FULL} while line breaking is set to one of
* {@link Layout#BREAK_STRATEGY_BALANCED}, {@link Layout#BREAK_STRATEGY_HIGH_QUALITY}
* improves the structure of text layout however has performance impact and requires more time
- * to do the text layout.
+ * to do the text layout.</p>
+ * <p>
+ * Compared with {@link #setLineBreakStyle(int)}, line break style with different strictness is
+ * evaluated in the ICU to identify the potential breakpoints. In
+ * {@link #setBreakStrategy(int)}, line break strategy handles the post processing of ICU's line
+ * break result. It aims to evaluate ICU's breakpoints and break the lines based on the
+ * constraint.
+ * </p>
*
* @attr ref android.R.styleable#TextView_breakStrategy
* @see #getBreakStrategy()