Calligraphy does not work with NavigationView
See original GitHub issueI tried to change it using Calligraphy configs but didn’t work
CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
.setDefaultFontPath("fonts/Roboto-RobotoRegular.ttf")
.setFontAttrId(R.attr.fontPath)
.build());
Also, I tried to get the menu from the NavigationView navigationView.getMenu()
and use CalligraphyTypefaceSpan
to set the title with no luck!
Is there anyway to achieve that?
Thanks in advance
Issue Analytics
- State:
- Created 8 years ago
- Reactions:4
- Comments:21 (7 by maintainers)
Top Results From Across the Web
Calligraphy uses default system font after applying custom ...
I have defined the following style which is used as app:itemTextAppearance of NavigationView . Now the text size is changed but uses the ......
Read more >Navigation View Problems | Apple Developer Forums
I've got multiple pages / views in my app (using Swift UI). But after I have navigated to my third view using navigation...
Read more >Frequently Asked Questions - Calligraphy Pens
FAQS. I AM LEFT HANDED, WHAT NIBS CAN I USE? If you are left handed, we have a versatile range of calligraphy products...
Read more >Navigation in SwiftUI 4: NavigationView, NavigationLink ...
Navigation in SwiftUI is very different than it is in UIKit. Read more to discover the different forms of navigation in SwiftUI.
Read more >SwiftUI Navigation - NavigationView & NavigationLink Tutorial
Your browser can't play this video. ... you how to navigate between screens in your SwiftUI app using NavigationView and NavigationLink.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I ended-up hacking the drawer menu to force the font when the
DrawerStateChanged
: See the source code here:https://gist.github.com/jzeferino/797c5e6b72c666b6f87969f6146a2a6e
@jzeferino Great tip! But, i realized that when the activity is resumed or when configuration changes, it uses the default font. In that case, it work when close and reopen the navigationview (eg. when the app is restarted or something related to configuration change while nav-view its opened).
Finally, i ended up using this approach:
(1) in strings.xml:
(2) in activity_home.xml:
Taken from here