Created
June 15, 2017 09:28
-
-
Save truongngoclinh/dd851ae076488cddb0e43a9b0c59ca2b to your computer and use it in GitHub Desktop.
SpanStringBuilder android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SpannableStringBuilder builder = new SpannableStringBuilder(printerName); | |
StyleSpan boldSpan = new StyleSpan(Typeface.BOLD); | |
builder.setSpan(boldSpan, printerName.indexOf(printerCode), printerName.indexOf(printerCode) + printerCode.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment