android - Actionbar text not changed to custom font after using Calligraphy library -


i using calligraphy library , working fine except in actionbar. using below lines calligraphy work

in oncreate():

 calligraphyconfig.initdefault(new calligraphyconfig.builder()             .setdefaultfontpath("fonts/regular.ttf")             .setfontattrid(r.attr.fontpath)             .build()); 

and

  @override protected void attachbasecontext(context newbase) {     super.attachbasecontext(calligraphycontextwrapper.wrap(newbase)); } 

using above fonts customized except in action bar. other steps need add?

tried below error saying cannot resolve constructor

    spannablestring s = new spannablestring("my title"); s.setspan(new typefacespan(this, "mytypeface.otf"), 0, s.length(),         spannable.span_exclusive_exclusive); 

any options? calligraphy version - compile 'uk.co.chrisjenx:calligraphy:2.2.0'

try using toolbar described here. check this comment calligraphy:

i don't support action bar, toolbars. it's maintain otherwise.


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -