My very first Android open source

TextView is a very common view component in Android that allows to display text to user. And sometimes you want to style for text like coloring, underlying,… but not the whole text. Yes, you only want to decorate a part of text in TextView. That means your TextView maybe have multiple styles inside.

In the early days as an Android developer, I implemented multiple styles TextView in a funny way. I used multiple TextView for each style. That could get your tasks done somehow but only for short text. If you want to decorate words or sentences in a paragraph by this way, you’ll fail.

Android SDK provides SpannableString to help you style a part of text in an TextView. But this time you face a problem (or not if you see it fine) that is you need to create Span for every single text you want to decorate. You maybe end up with duplicated code. That’s why I create text-decorator to ease your work. All you need is indicating the text you want to style and choose a style for it and boom… you have what you need.

You can check for usage.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s