public class FontLoader
extends java.lang.Object
TextView
or for just loading and returning the Typeface themselves.
For a list of all 'types' that can be used see Face
Created by drew@52inc.co on 6/26/14.| Constructor and Description |
|---|
FontLoader() |
| Modifier and Type | Method and Description |
|---|---|
static void |
apply(android.app.Activity activity,
int viewId,
Face type)
Apply a typeface to a given view by id
|
static void |
apply(android.widget.TextView textView,
Face type)
Apply a typeface to a textview
|
static void |
apply(android.view.View parent,
int viewId,
Face type)
Apply a typeface to a given view by id
|
static android.graphics.Typeface |
getTypeface(android.content.Context ctx,
Face type)
Get a Roboto typeface for a given string type
|
public static void apply(android.widget.TextView textView,
Face type)
textView - the text view you wish to apply totype - the typeface to applyFacepublic static void apply(android.view.View parent,
int viewId,
Face type)
viewId - the TextView to apply to idparent - the parent of the text viewtype - the typeface type argumentpublic static void apply(android.app.Activity activity,
int viewId,
Face type)
activity - the activity in which the textview residesviewId - the id of the textview you want to styletype - the typeface code to applypublic static android.graphics.Typeface getTypeface(android.content.Context ctx,
Face type)
ctx - the application contexttype - the typeface type argument