kofigyan / StateProgressBar

Android library to realize the various states and transitions in a ProgressBar.
1.54k stars 232 forks source link

Unable to Add Custom Font to State Items and State Description Data #41

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi,

I have placed my fonts under assets like below

image

and try to update the font using below code

        binding.apply {
            stbChooseSavingProgress.setStateDescriptionTypeface("fonts/myraid_pro_light.ttf")
            stbChooseSavingProgress.setStateNumberTypeface("fonts/myraid_pro_light.ttf")
        }

But I always got error: the font is not found.

Please help me, Thanks

kofigyan commented 5 years ago

Hi @PaijoRX , sorry for the delay in reply. I have started looking at the above problem. Please are you using Android DataBinding library ?

ghost commented 5 years ago

Yes, I'm using DataBinding on my project