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

Commit 7ad6a515 authored by Haoyu Zhang's avatar Haoyu Zhang
Browse files

Update LineBackgroundSpan.Standard java doc

Add code demo and result image.

Bug: 1526775
Test: make offline-sdk-docs
Change-Id: Ie8f7aa67a49dd79389e3973c2d94a204a1315e11
parent b54aa3d9
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -53,6 +53,15 @@ public interface LineBackgroundSpan extends ParagraphStyle
    /**
     * Default implementation of the {@link LineBackgroundSpan}, which changes the background
     * color of the lines to which the span is attached.
     * <p>
     * For example, an <code>LineBackgroundSpan</code> can be used like this:
     * <pre>
     * String text = "This is a multiline text. LineBackgroundSpan is applied here. This is a multiline text.";
     * SpannableString string = new SpannableString(text);
     * string.setSpan(new LineBackgroundSpan.Standard(Color.YELLOW), 26, 61, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
     * </pre>
     * <img src="{@docRoot}reference/android/images/text/style/linebackgroundspan.png" />
     * <figcaption>Text with <code>LineBackgroundSpan</code></figcaption>
     */
    class Standard implements LineBackgroundSpan, ParcelableSpan {

+28.9 KiB
Loading image diff...