public class

Fonts

extends Object
java.lang.Object
   ↳ com.urbanairship.Fonts

Class Overview

Helper class to cache and resolve font families.

Summary

Public Methods
synchronized void addFontFamily(String fontFamily, Typeface typeface)
Adds a type face for a given font family.
synchronized Typeface getFontFamily(String fontFamily)
Gets the type face for a given font family.
static Fonts shared(Context context)
Gets the shared fonts instance.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public synchronized void addFontFamily (String fontFamily, Typeface typeface)

Adds a type face for a given font family.

Parameters
fontFamily The font family.
typeface The typeface.

public synchronized Typeface getFontFamily (String fontFamily)

Gets the type face for a given font family.

Parameters
fontFamily The font family.
Returns
  • The type face or null if the font family is unavailable.

public static Fonts shared (Context context)

Gets the shared fonts instance.

Parameters
context The application context.
Returns
  • The shared instance.