Back to project page FaceTag-Android.
The source code is released under:
GNU General Public License
If you think the Android project FaceTag-Android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package edu.grinnell.facetag.utils; /*from w w w. j a va 2s.c o m*/ import android.content.Context; import android.content.res.Resources; import android.graphics.Typeface; import android.view.View; import android.widget.TextView; public class actionBarFont { public static void fontChange(View v, Context c){ TextView mAppName; int titleId = Resources.getSystem().getIdentifier("action_bar_title", "id", "android"); if(titleId == 0) titleId = com.actionbarsherlock.R.id.abs__action_bar_title; mAppName = (TextView) v.findViewById(titleId); Typeface face = Typeface.createFromAsset(c.getAssets(), "fonts/Raleway-Regular.ttf"); mAppName.setTypeface(face); } public static void fontChangeText(TextView v, Context c){ Typeface tf = Typeface.createFromAsset(c.getAssets(), "fonts/Raleway-Regular.ttf"); v.setTypeface(tf); } }