List of utility methods to do Typeface Create
void | setTypeface(Context context, String font, int style, TextView... textViews) Sets a determined font on a text view element Typeface tf = Typeface.createFromAsset(context.getAssets(), font);
for (TextView txt : textViews) {
txt.setTypeface(tf, style);
|
void | setTypeface(Context context, String font, TextView... textViews) Sets a determined font on a text view element Typeface tf = Typeface.createFromAsset(context.getAssets(), font);
for (TextView txt : textViews) {
txt.setTypeface(tf);
|
void | setTypeface(Context context, String font, Button... buttons) Sets a determined font on a button element view Typeface tf = Typeface.createFromAsset(context.getAssets(), font);
for (Button txt : buttons) {
txt.setTypeface(tf);
|
void | setTypeface(Context context, String font, int style, Button... buttons) Sets a determined font on a text view element Typeface tf = Typeface.createFromAsset(context.getAssets(), font);
for (Button txt : buttons) {
txt.setTypeface(tf, style);
|
void | setTypeface(Context context, String font, int style, ViewGroup group) Sets a determined font on a text view element Typeface tf = Typeface.createFromAsset(context.getAssets(), font); int count = group.getChildCount(); View v; for (int i = 0; i < count; i++) { v = group.getChildAt(i); if (v instanceof TextView) ((TextView) v).setTypeface(tf, style); else if (v instanceof ViewGroup) ... |
void | setTypeface(Context context, String font, ViewGroup group) Sets a determined font on a text view element Typeface tf = Typeface.createFromAsset(context.getAssets(), font); int count = group.getChildCount(); View v; for (int i = 0; i < count; i++) { v = group.getChildAt(i); if (v instanceof TextView) ((TextView) v).setTypeface(tf); else if (v instanceof ViewGroup) ... |
Typeface | getTypeface(Activity activity) get Typeface if (mTypeface == null) { mTypeface = Typeface.createFromAsset(activity.getAssets(), "fonts/DejaVuSans.ttf"); return mTypeface; |