diff --git a/core/java/android/text/style/LineHeightSpan.java b/core/java/android/text/style/LineHeightSpan.java index 7fb0f950f583b..610cf2c7c784c 100644 --- a/core/java/android/text/style/LineHeightSpan.java +++ b/core/java/android/text/style/LineHeightSpan.java @@ -70,7 +70,15 @@ public interface LineHeightSpan extends ParagraphStyle, WrapTogetherSpan { * Default implementation of the {@link LineHeightSpan}, which changes the line height of the * attached paragraph. *

- * LineHeightSpan will change the line height of the entire paragraph, even though it + * For example, a paragraph with its line height equal to 100px can be set like this: + *

+     * SpannableString string = new SpannableString("This is a multiline paragraph. This is a multiline paragraph.");
+     * string.setSpan(new LineHeightSpan.Standard(100), 0, string.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
+     * 
+ * + *
Text with line height set to 100 pixels.
+ *

+ * Notice that LineHeightSpan will change the line height of the entire paragraph, even though it * covers only part of the paragraph. *

*/ diff --git a/docs/html/reference/images/text/style/lineheightspan.png b/docs/html/reference/images/text/style/lineheightspan.png new file mode 100644 index 0000000000000..18f575392b633 Binary files /dev/null and b/docs/html/reference/images/text/style/lineheightspan.png differ