public SpannableString build() { HashMap<String, ITypeface> mappedFonts = new HashMap<String, ITypeface>(); for (ITypeface font : fonts) { mappedFonts.put(font.getMappingPrefix(), font); } return Iconics.style(ctx, mappedFonts, text, withStyles, withStylesFor); }
public void build() { HashMap<String, ITypeface> mappedFonts = new HashMap<String, ITypeface>(); for (ITypeface font : fonts) { mappedFonts.put(font.getMappingPrefix(), font); } if (view.getText() instanceof SpannableString) { view.setText( Iconics.style( ctx, mappedFonts, (SpannableString) view.getText(), withStyles, withStylesFor)); } else { view.setText( Iconics.style( ctx, mappedFonts, new SpannableString(view.getText()), withStyles, withStylesFor)); } if (Build.VERSION.SDK_INT >= 14) { if (view instanceof Button) { view.setAllCaps(false); } } }