Skip to content

Latest commit

 

History

History
13 lines (12 loc) · 750 Bytes

README.md

File metadata and controls

13 lines (12 loc) · 750 Bytes

StringStyleBuilder

Easy to use SpannableStringBuilder for Android. Simply insert StringStyleBuilder.java file to anywhere in your project and use it like this:

StringStyleBuilder stringStyleBuilder = new StringStyleBuilder()
                          .addRegular("Regular text with some ")
                          .addBold("BOLD TEXT ")
                          .addRegular("then some regular again or you might want to ")
                          .addLink("click this line to go to my github ", "https://guthub.com/koceeng")
                          .addRegular("and ")
                          .addColored("give me a hug", Color.rgb(255, 0, 0));
yourTextView.setText(stringStyleBuilder.get(), TextView.BufferType.SPANNABLE);