linkedin / Spyglass

A library for mentions on Android
Apache License 2.0
387 stars 128 forks source link

Add options to change mention text style (bold, italic etc) #103

Closed pilgr closed 4 years ago

pilgr commented 4 years ago

First of all, thank you for making great library and for sharing it with the community!

I would like to contribute one missing feature: changing text style for mentions.

With this PR users have options to configure mention spans in an additional way by changing the text style (normal, bold, italic, bold italic) using xml attributes or MentionSpanConfig.Builder.

Looking forward for a new version!

nhibner commented 4 years ago

Is this something that would be useful to many developers? I'd prefer not to complicate the APIs if this is primarily for a single use case right now. Note that the library already allows developers to set their own factory for constructing custom MentionSpan instances (which would allow custom styling as done here).

nhibner commented 4 years ago

Closing for now, open to reconsidering if this is something that multiple devs would find useful

timtsj commented 3 years ago

@nhibner hi i need it, or maybe be cool if we can pass textappearance

nhibner commented 3 years ago

@timtsj hello, I'd like to learn more about your use case. Have you tried customizing the appearance of your spans by setting your own MentionSpanFactory?

timtsj commented 3 years ago

@nhibner yeah, currently i create my own spanfactory, but i think its will be more quick if we can pass text apperiance for most use case with text