Skip to content

Having Issue applying style on StepperLayout #290

Description

@kevintorch

Styles are not applying on Stepper Layout. I've added "ms_stepperStyle" in main application theme as shown below.

`

<style name="AppTheme.Default">
    <item name="appBarLayoutBackground">?colorPrimary</item>
    <item name="ms_stepperStyle">@style/StepperStyle</item>
    <item name="bottomNavigationStyle">@style/Widget.eduCare.BottomNavigationView</item>
    <item name="toolbarIconTint">@color/appColorOnDarkSurfaceHighEmphasis</item>
    <item name="appTextColorPrimary">@color/white</item>
    <item name="toolbarStyle">@style/Widget.eduCare.Toolbar.Primary</item>
</style>

<style name="StepperStyle" parent="MSDefaultStepperLayoutTheme">
    <item name="ms_bottomNavigationStyle">@style/Widget.StepperStyle.BottomNavigation</item>
    <item name="ms_backNavigationButtonStyle">@style/Widget.StepperStyle.Button.Back</item>
    <item name="ms_nextNavigationButtonStyle">@style/Widget.StepperStyle.Button.Next</item>
    <item name="ms_completeNavigationButtonStyle">@style/Widget.StepperStyle.Button.Complete
    </item>
</style>

<style name="Widget.StepperStyle.BottomNavigation" parent="">
    <item name="android:layout_height">200dp</item>
    <item name="android:background">?colorSurface</item>
    <item name="elevation">16dp</item>
</style>

<style name="Widget.StepperStyle.Button" parent="Widget.eduCare.Button.TextButton" />

<style name="Widget.StepperStyle.Button.Back" parent="Widget.eduCare.Button.TextButton"></style>

<style name="Widget.StepperStyle.Button.Next"></style>

<style name="Widget.StepperStyle.Button.Complete">
    <item name="android:text">Save</item>
</style>

`

but the style is not being applied.

And here is StepperLayout

<com.stepstone.stepper.StepperLayout android:id="@+id/stepperLayout" android:layout_width="match_parent" android:layout_height="match_parent" app:ms_stepperType="dots" app:ms_activeStepColor="?appColorPrimaryDark" app:ms_errorColor="?appColorError" app:ms_completeButtonColor="?appColorPrimaryDark" app:ms_nextButtonColor="?appColorPrimaryDark" app:ms_backButtonColor="?appColorPrimaryDark" app:ms_backButtonBackground="@color/caldroid_transparent" app:ms_completeButtonText="Save Enquiry" app:ms_stepperLayoutTheme="?ms_stepperStyle" app:layout_behavior="@string/appbar_scrolling_view_behavior" />

if i add theme attribute to StepperLayout it crashes and gives me the error below:

layout/ms_stepper_layout: Binary XML file line 49: You must supply a layout_width attribute

Please Help

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions