Open kevintorch opened 4 years ago
Hi,
It seems that you've mixed styles and themes a bit in here. ms_stepperStyle
is used to set a global style in the app. In the code you posted you're assigning a theme to it though:
<style name="StepperStyle" parent="MSDefaultStepperLayoutTheme">
if you want to set a theme you should use ms_stepperLayoutTheme
instead.
I can see that you're setting via app:ms_stepperLayoutTheme="?ms_stepperStyle"
so the one in AppTheme.Default
should not be needed.
For a sample usage see: https://github.com/stepstone-tech/android-material-stepper/blob/master/sample/src/main/res/values/styles.xml
AppThemeDark
-> CustomStepperLayoutThemeSample
-> DarkCustomStepperLayoutTheme
https://github.com/stepstone-tech/android-material-stepper#custom-styling
Styles are not applying on Stepper Layout. I've added "ms_stepperStyle" in main application theme as shown below.
`
`
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