Here you can find the source of setReadingFontOnChildren(ViewGroup container)
public static void setReadingFontOnChildren(ViewGroup container)
//package com.java2s; //License from project: Open Source License import android.graphics.Typeface; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class Main { public static void setReadingFontOnChildren(ViewGroup container) { Typeface font = Typeface.createFromAsset(container.getContext() .getAssets(), "Palatino.ttc"); View this_view; for (int x = 0; x < container.getChildCount(); x++) { this_view = container.getChildAt(x); if (this_view.getTag() != null) { if (this_view.getTag().toString().compareTo("custom_font") == 0) { ((TextView) this_view).setTypeface(font, Typeface.NORMAL); } else if (this_view.getTag().toString() .compareTo("custom_font_bold") == 0) { ((TextView) this_view).setTypeface(font, Typeface.BOLD); } else if (this_view.getTag().toString() .compareTo("custom_font_italic") == 0) { ((TextView) this_view).setTypeface(font, Typeface.ITALIC); }/*from w ww .ja v a 2 s . c o m*/ } } } }