textView.setTypeface(Typeface.createFromAsset(getAssets(), "fonts/yahei.ttf"));
import android.content.Context;
import android.graphics.Typeface;
import android.widget.TextView;
public class Fonter {
public static void format(Context context, TextView textView){
textView.setTypeface(Typeface.createFromAsset(context.getAssets(), "fonts/yahei.ttf"));
}
}