package com.idogfooding.backbone.utils;

import android.content.Context;
import android.graphics.Typeface;
import android.text.TextUtils;
import android.widget.TextView;

/**
 * IconFontUtils
 *
 * @author Charles
 */
public class IconFontUtils {

    public static void setIconFont(Context context, String fontName, TextView... views) {
        if (null == context || views.length == 0 || TextUtils.isEmpty(fontName))
            return;

        Typeface iconfont = Typeface.createFromAsset(context.getAssets(), fontName);
        if (null == iconfont)
            return;

        for (TextView view : views) {
            view.setTypeface(iconfont);
        }
    }

}

@@ -191,61 +191,439 @@
 s%0A *
-%0A * @author Charles%0A */%0Apublic class IconFontUtils %7B%0A
+ %E5%9C%A8app%E4%B8%AD%E5%BE%80%E5%BE%80%E6%9C%89%E9%9C%80%E8%A6%81%E5%9B%BE%E6%A0%87%E5%92%8C%E6%96%87%E5%AD%97%E4%B8%80%E8%B5%B7%E6%98%BE%E7%A4%BA%E7%9A%84%E6%97%B6%E5%80%99%EF%BC%8C%E8%80%8C%E4%B8%BA%E4%BA%86%E5%81%B7%E6%87%92%E4%B8%8D%E6%83%B3%E9%87%8D%E6%96%B0%E4%BF%AE%E6%94%B9%E5%B8%83%E5%B1%80%EF%BC%8C%E5%BC%95%E5%85%A5%E5%9B%BE%E7%89%87%EF%BC%8C%E5%B0%B1%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8iconfont%E3%80%82%0A *%0A * %E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95%EF%BC%9A%0A * 1. %E5%9C%A8http://iconfont.cn/%E7%AD%89%E7%BD%91%E7%AB%99%E6%89%BE%E5%88%B0%E5%AF%B9%E4%BA%8E%E7%9A%84%E5%9B%BE%E6%A0%87%EF%BC%8C%E4%B8%8B%E8%BD%BD%0A * 2. %E5%B0%86%E4%B8%8B%E8%BD%BD%E5%BE%97%E5%88%B0%E7%9A%84iconfont.ttf%E6%94%BE%E5%85%A5assets%E6%96%87%E4%BB%B6%E5%A4%B9%E4%B8%AD%0A * 3. %E5%9C%A8%E9%9C%80%E8%A6%81%E4%BD%BF%E7%94%A8TextView%E7%9A%84%E5%9C%B0%E6%96%B9%E8%B0%83%E7%94%A8IconFontUtils(context, %22iconfont.ttf%22, textview1, textview2);%0A * 4. %E5%AD%97%E4%BD%93%E4%BD%BF%E7%94%A8%E9%9C%80%E8%A6%81%E7%94%A8uniocode%EF%BC%8C%E5%A6%82 %E5%BD%93%E5%89%8D%E4%BD%8D%E7%BD%AE &#xe605; %E5%AE%81%E6%B3%A2%0A *%0A * @author Charles%0A */%0Apublic class IconFontUtils %7B%0A%0A    /**%0A     * set icon font%0A     * @param context%0A     * @param fontName%0A     * @param views%0A     */
 %0A   

add iconfont utils