package com.study.sketch.learning.manager;

import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;

import androidx.annotation.Nullable;

import com.study.sketch.learning.R;

public class CustomerTextView extends androidx.appcompat.widget.AppCompatTextView {


    public CustomerTextView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initAttrs(context,attrs);
    }


    private void initAttrs(Context context, AttributeSet attrs){
        TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.MyTV);
        boolean aBoolean = typedArray.getBoolean(R.styleable.MyTV_apply_font,false);
        if(aBoolean){
            Common.initFont(this);
        }

        typedArray.recycle();
    }



}
