Open shrine2000 opened 3 years ago
Kotlin:
fastScrollerView.textAppearanceRes = R.style.MyTextAppearance
Java:
fastScrollerView.setTextAppearanceRes(R.style.MyTextAppearance)
The example you have show only work with style.xml. I want to apply custom font by selecting .ttf file from phone during runtime.
val typeface = Typeface.createFromFile(File(appPreferences.customFontPath)) textView.typeface = typeface
Checkout my github repo. I have created a demo of it - link
Ah, you're totally correct. Should build a way to set this programmatically.
How to change the font and text color during runtime? If possible kindly help with code.