Code example for TypefaceSpan

1
  } 
 
  private Spannable getHeaderString(String text) {
    SpannableString spanned = new SpannableString(text);
    // spanned.setSpan(new UnderlineSpan(), 0, text.length(), 0); 
    spanned.setSpan(new TypefaceSpan("serif"), 0, text.length(), 0);
    return spanned;
  } 
 
  private Spannable getCrewAppearanceString(List<CrewAppearance> appearances) {
    String source = TextUtils.join("\n", appearances);
    SpannableString spanned = new SpannableString(source);
    spanned.setSpan(new TextAppearanceSpan(getActivity(), R.style.TextAppearance_Credits_Gold), 0,
        source.length(), 0);
    return spanned;
  } 
 
  private Spannable getCastAppearanceString(List<CastAppearance> appearances) {
    SpannableStringBuilder sb = new SpannableStringBuilder();
    for (CastAppearance castAppearance : appearances) {
      String actor = castAppearance.getName();