Back to project page ihatecolor_and.
The source code is released under:
Copyright (c) 2013, Sewon Ann All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * ...
If you think the Android project ihatecolor_and 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 kr.pe.kingori.ihatecolor.util; //from w ww . ja va2s .c o m import android.content.Context; import android.graphics.Typeface; import android.text.TextPaint; import android.widget.TextView; import kr.pe.kingori.ihatecolor.R; public class FontManager { private static Typeface customTypeFace; private FontManager() { } public static void init(Context context) { customTypeFace = Typeface.createFromAsset(context.getAssets(), context.getString(R.string.typeface_path)); } public static TextView applyTypeface(TextView view) { view.setTypeface(customTypeFace, Typeface.BOLD); return view; } public static TextPaint applyTypeface(TextPaint tp) { tp.setTypeface(customTypeFace); return tp; } }