Code example for View

Methods: getContext

0
 
    public static <T extends View> T apply(T view, Font font) {
        if (view == null || font == null) {
            return view;
        } 
        font.mContext = view.getContext();
        applyInternal(view, font);
        return view;
    } 
 
    public static <T extends View> T applyDefaultFont(T view) {
        return apply(view, sDefaultFont);
    } 
 
    private static void applyInternal(View view, Font font) {
        if (view instanceof ViewGroup) {
            final ViewGroup vg = (ViewGroup) view;
            final int childCount = vg.getChildCount();
            for (int i = 0; i < childCount; i++) {
                applyInternal(vg.getChildAt(i), font);
            }