From 65c45fc0295e788135db9aa5670007a46623c8df Mon Sep 17 00:00:00 2001 From: Seigo Nonaka Date: Tue, 31 Jan 2023 16:35:11 +0900 Subject: [PATCH] Fix documentation errors Bug: 266591082 Test: N/A Change-Id: Iec8493a6ed43d2186da92207fa1f16ac7f882dd9 --- core/java/android/text/Highlights.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/java/android/text/Highlights.java b/core/java/android/text/Highlights.java index 356dfcaeb93b8..ac4a5f2881ccf 100644 --- a/core/java/android/text/Highlights.java +++ b/core/java/android/text/Highlights.java @@ -38,9 +38,9 @@ public class Highlights { } /** - * Returns a number of highlight. + * Returns the number of highlight. * - * @return a number of highlight. + * @return the number of highlight. * * @see Builder#addRange(Paint, int, int) * @see Builder#addRanges(Paint, int...) @@ -53,7 +53,7 @@ public class Highlights { * Returns a paint used for the i-th highlight. * * @param index an index of the highlight. Must be between 0 and {@link #getSize()} - * @return a paint object + * @return the paint object * * @see Builder#addRange(Paint, int, int) * @see Builder#addRanges(Paint, int...) @@ -72,7 +72,7 @@ public class Highlights { * [1, 2, 3, 4]. * * @param index an index of the highlight. Must be between 0 and {@link #getSize()} - * @return a paint object + * @return the flattened ranges. * * @see Builder#addRange(Paint, int, int) * @see Builder#addRanges(Paint, int...) @@ -90,6 +90,9 @@ public class Highlights { /** * Add single range highlight. * + * If the given range has overlaps with the already added ranges, the previous highlights + * are overdrawn by this range. + * * @param paint a paint object used for drawing highlight path. * @param start an inclusive offset of the text. * @param end an exclusive offset of the text. @@ -111,6 +114,9 @@ public class Highlights { /** * Add multiple ranges highlight. * + * If the given ranges have overlap with the already added ranges, the previous highlights + * are overdrawn by this range. + * * @param paint a paint object used for drawing highlight path. * @param ranges a flatten ranges. The {@code 2 * i}-th element is an inclusive start offset * of the {@code i}-th character. The {@code 2 * i + 1}-th element is an