I'm using SpannableStringBuilder to set a string partially with a style of bold, however it's not working and I am unsure of what I am doing incorrectly.
String normalText = "New Here? ";
String boldText = "Register";
SpannableStringBuilder str = new SpannableStringBuilder(normalText + boldText);
tr.setSpan(new StyleSpan(Typeface.BOLD), normalText.length(), str.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
mBtnRegister.setText(str);
I've followed this SO example: