z3ntu added a comment.

  I don't see a reason why rich text should be limited to API24+? Yes, the 
`fromHtml(String source, int flags)` method is API 24+ but for APIs lower than 
that you can use `fromHtml(String source)` as for example wrapped in 
`androidx.core.text.HtmlCompat`:
  
    /**
        * Invokes {@link Html#fromHtml(String, int)} on API 24 and newer, 
otherwise {@code flags} are
        * ignored and {@link Html#fromHtml(String)} is used.
        */
    @NonNull
    public static Spanned fromHtml(@NonNull String source, @FromHtmlFlags int 
flags) {
        if (Build.VERSION.SDK_INT >= 24) {
            return Html.fromHtml(source, flags);
        }
        //noinspection deprecation
        return Html.fromHtml(source);
    }

REPOSITORY
  R289 KNotifications

BRANCH
  pending

REVISION DETAIL
  https://phabricator.kde.org/D29357

To: vkrause, tfella
Cc: z3ntu, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns

Reply via email to