ernestoyaquello / VerticalStepperForm

Vertical Stepper Form Library for Android. It follows Google Material Design guidelines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Step title

kostadin24 opened this issue · comments

Hi,
I have symbols defined in custom font.
Trying to set Typeface for step title.
Is this possible?

For now my approach is to use findViewById to catch step tile.But I'm afraid that doing this in future my app can stop work.

Hi, and sorry for the delay.

I have implemented this, you can find the new functionality in the version 2.4.0 of the library.

To use it in XML:

<ernestoyaquello.com.verticalstepperform.VerticalStepperFormView 
    ...
    app:form_step_title_font_family="@font/your_custom_font"
    app:form_step_subtitle_font_family="@font/your_custom_font"
    app:form_step_number_font_family="@font/your_custom_font"
    app:form_step_error_message_font_family="@font/your_custom_font"/>

To use it in code:

verticalStepperForm
    .setup(this, userNameStep, userEmailStep, userAgeStep)
    ...
    .stepTitleFontFamily(yourCustomFont)
    .stepSubtitleFontFamily(yourCustomFont)
    .stepNumberFontFamily(yourCustomFont)
    .stepErrorMessageFontFamily(yourCustomFont)
    ...
    .init();

I hope this helps, and thank you for your suggestion!