HtmlView font-family & color


#1

Hi !

I would to use a HtmlView to display HTML content into a List. I can’t use a WebView because is not smooth with a ListView. But I would to use custom font and custom color and it’s not possible with HtmlView & Android.

Could you help me please ?

Thanks !


#2

Use formatted string instead, this may add you extra work if your source is HTML - you might have to write your logics to parse it properly and transform them to attributes for formatted string. But it works on both platform and better for performance.


#3

I agree.
Simple example might be:

<Label class="sign">
<Label.formattedText>
    <FormattedString>
        <FormattedString.spans>
            <Span text="NOT A USER ? "></Span>
            <Span class="sign-link" text=" SIGN UP"></Span>
        </FormattedString.spans>
    </FormattedString>
</Label.formattedText>
</Label>