IndicatorFastScroll icon indicating copy to clipboard operation
IndicatorFastScroll copied to clipboard

Support for custom font.

Open shrine2000 opened this issue 5 years ago • 3 comments

How to change the font and text color during runtime? If possible kindly help with code.

Screenshot 2021-01-10 at 23 57 53

shrine2000 avatar Jan 10 '21 18:01 shrine2000

Kotlin:

fastScrollerView.textAppearanceRes = R.style.MyTextAppearance

Java:

fastScrollerView.setTextAppearanceRes(R.style.MyTextAppearance)

DSteve595 avatar Jan 10 '21 18:01 DSteve595

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

shrine2000 avatar Jan 12 '21 08:01 shrine2000

Ah, you're totally correct. Should build a way to set this programmatically.

DSteve595 avatar Jan 23 '21 22:01 DSteve595