Skip to content

Instantly share code, notes, and snippets.

@jemerick
Created May 21, 2010 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jemerick/409005 to your computer and use it in GitHub Desktop.
Save jemerick/409005 to your computer and use it in GitHub Desktop.
// create a spannable string
SpannableString spanstring = new SpannableString("bold\ntumblelog");
// make the first 4 chars bold
spanstring.setSpan(new StyleSpan(Typeface.BOLD), 0, 4, Spanned.SPAN_INCLUSIVE_EXCLUSIVE);
// set the text of the button
sendButton.setText(spanstring);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment