MaterialNumberPicker
MaterialNumberPicker copied to clipboard
crashing when custom font is set
maybe I'm doing this totally wrong. But I have a custom font and I need to set it. I tried passing just the string of the font. which i have in res/font/montessara_light_black as "montessara_light_black" in the setFont. It just crashed. Can you show how to do that?
Indeed this supports fonts from asset folder. Using fonts from font folder was not possible when this library was created. This should be changed in order to support this
I prepared a PR to support this way to load the fonts: https://github.com/StephenVinouze/MaterialNumberPicker/pull/21
With this method, we could add our own typeface object instead of use only the fontName from the assets folder
Example:
materialNumberPicker.setFontName(ResourcesCompat.getFont(this, R.font.app_font))
Cool! :D