package com.fun.originalityprank.tool;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.widget.TextView;

import androidx.annotation.Nullable;

@SuppressLint("AppCompatCustomView")
public class MytextView extends TextView {
    public MytextView(Context context) {
        super(context);
        initData();
    }

    public MytextView(Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initData();
    }

    public MytextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initData();
    }

    public MytextView(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        initData();
    }

    private void initData(){
        setTypeface(Typeface.createFromAsset(getContext().getAssets(), "PaytoneOne-Regular.ttf"));
    }
}
