Java Code Examples for org.appcelerator.titanium.util.TiUIHelper#toTypeface()
The following examples show how to use
org.appcelerator.titanium.util.TiUIHelper#toTypeface() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TypefaceSpan.java From actionbarextras with MIT License | 5 votes |
/** * Load the {@link Typeface} and apply to a {@link Spannable}. */ public TypefaceSpan(Context context, String typefaceName) { mTypeface = sTypefaceCache.get(typefaceName); if (mTypeface == null) { mTypeface = TiUIHelper.toTypeface( context, typefaceName ); // Cache the loaded Typeface sTypefaceCache.put(typefaceName, mTypeface); } }
Example 2
Source File: ActionbarextrasModule.java From actionbarextras with MIT License | 4 votes |
private IconDrawable getDrawableFromFont(HashMap args) { Typeface iconFontTypeface = TiUIHelper.toTypeface(TiApplication.getInstance(), (String) args.get(TiC.PROPERTY_FONTFAMILY)); return new IconDrawable(TiApplication.getInstance(), (String) args.get(TiC.PROPERTY_ICON), iconFontTypeface).actionBarSize().color(TiConvert.toColor((String) args.get(TiC.PROPERTY_COLOR))); }