android - How to use more than one fontpath in xml files? -


 public void oncreate() {     super.oncreate();     calligraphyconfig.initdefault(new calligraphyconfig.builder()                     //.setdefaultfontpath("fonts/helvlight-regular.ttf")                     .setdefaultfontpath("fonts/helveticaneue-light.otf")                     //.setdefaultfontpath("fonts/helveticaneue-medium.otf")                     //.setdefaultfontpath("fonts/helveticaneuebold.ttf")                     //.setdefaultfontpath("fonts/myriadpro-regular.otf")                     .setfontattrid(r.attr.fontpath)                     .build()     ); } 

xml file:

    <edittext         android:id="@+id/edittextpassword"         fontpath="fonts/helveticaneue-light.otf"         android:layout_width="fill_parent"         android:layout_height="40dp"         android:layout_marginleft="20dp"         android:layout_marginright="20dp"         android:layout_margintop="8dp"         android:background="@color/white"         android:hint="@string/hint_password_login"         android:inputtype="textpassword"         android:padding="8dp"         android:textcolor="@color/app_hint_text_color"         android:textcolorhint="@color/app_hint_text_color"         android:textcursordrawable="@drawable/cursor_drawable" />      <button         android:id="@+id/button_login"         fontpath="fonts/helveticaneue-medium.otf"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:layout_marginleft="25dp"         android:layout_marginright="25dp"         android:layout_margintop="25dp"         android:background="@color/app_theme_color"         android:text="login"         android:textcolor="@color/white" />      <textview         android:id="@+id/txt_forgot_password"         fontpath="fonts/helveticaneue-light.otf"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         android:layout_gravity="center"         android:layout_marginbottom="10dp"         android:layout_margintop="10dp"         android:gravity="center"         android:text="forgot password?"         android:textcolor="@color/app_theme_text_color"         android:textsize="14sp" /> 

inside xml used fontpath button,edittext , textview used more 1 fontpath like

"helveticaneue-light.otf" , "helveticaneue-medium.otf"

in xml file , insert these format calligrapthyconfig , font style not changed.

i insert helvetica font in font folder inside assets.

can solve problem? how use call calligraphyconfig.initdefault more 1 styles , how insert helveltical fonts...if knows plz slove issue


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -