Can anyone help me to define a custom class for android Textview
with a custom font in kotlin
?
create a folder "font" inside "res" folder and copy your font
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/muli_font"
/>
programmatically
view.setTypeface(ResourcesCompat.getFont(context, R.font.muli_font))
you can download ".ttf" font from here