35 lines
752 B
Java
35 lines
752 B
Java
package com.smi.smartlab;
|
|
|
|
|
|
import android.content.Context;
|
|
import android.graphics.Typeface;
|
|
import android.util.AttributeSet;
|
|
|
|
import androidx.appcompat.widget.AppCompatTextView;
|
|
|
|
public class FontAwesome extends AppCompatTextView {
|
|
|
|
|
|
public FontAwesome(Context context, AttributeSet attrs, int defStyle) {
|
|
super(context, attrs, defStyle);
|
|
init();
|
|
}
|
|
|
|
public FontAwesome(Context context, AttributeSet attrs) {
|
|
super(context, attrs);
|
|
init();
|
|
}
|
|
|
|
public FontAwesome(Context context) {
|
|
super(context);
|
|
init();
|
|
}
|
|
|
|
private void init() {
|
|
|
|
Typeface tf = Typeface.createFromAsset(getContext().getAssets(),
|
|
"fa-solid-900.ttf");
|
|
setTypeface(tf);
|
|
}
|
|
|
|
} |