Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 10b1aeec authored by Haoyu Zhang's avatar Haoyu Zhang
Browse files

Add code sample and result image for LineHeightSpan

Bug: 112621694
Test: make offline-sdk-docs
Change-Id: I6d8f022eb24d1d1b17a97999d15a798a04ec0df3
parent b54aa3d9
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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.
     * <p>
     * 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:
     * <pre>
     * 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);
     * </pre>
     * <img src="{@docRoot}reference/android/images/text/style/lineheightspan.png" />
     * <figcaption>Text with line height set to 100 pixels.</figcaption>
     * <p>
     * Notice that LineHeightSpan will change the line height of the entire paragraph, even though it
     * covers only part of the paragraph.
     * </p>
     */
+23.4 KiB
Loading image diff...