Skip to content

Commit 3d07fd4

Browse files
Piotr Zawadzkizawadz88
Piotr Zawadzki
authored andcommitted
Updated README + version update to 2.2.0
1 parent 58a1a55 commit 3d07fd4

File tree

3 files changed

+37
-9
lines changed

3 files changed

+37
-9
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Quoting the [documentation](https://www.google.com/design/spec/components/steppe
1111
1212
## Download (from JCenter)
1313
```groovy
14-
compile 'com.stepstone.stepper:material-stepper:2.1.0'
14+
compile 'com.stepstone.stepper:material-stepper:2.2.0'
1515
```
1616

1717
## Supported steppers
@@ -313,6 +313,12 @@ It is possible to use this library without the need to rely on Fragments.
313313
To do so you need to use ```AbstractStepAdapter``` instead of ```AbstractFragmentStepAdapter```.
314314
For an example of how to use it with views please see the sample app.
315315

316+
### Custom styling
317+
Basic styling can be done by choosing the active and inactive step colors.
318+
There are some additional properties which can be changed directly from StepperLayout's attributes e.g. the background of bottom navigation buttons (see <a href="#stepperlayout-attributes">StepperLayout attributes</a>)
319+
For advanced styling you can use `ms_stepperLayoutTheme` StepperLayout's attribute and provide your custom style to be used.
320+
See 'Custom StepperLayout theme - progress bar' and 'Custom StepperLayout theme - Tabs dark' in the sample app for an example.
321+
316322
### Advanced usage
317323
For other examples, e.g. persisting state on rotation, displaying errors, changing whether the user can go to the next step, etc. check out the sample app.
318324

@@ -334,8 +340,30 @@ For other examples, e.g. persisting state on rotation, displaying errors, changi
334340
| *ms_completeButtonText* | string or reference | COMPLETE button's text |
335341
| *ms_tabStepDividerWidth* | dimension or reference | The width of the horizontal tab divider used in tabs stepper type |
336342
| *ms_showBackButtonOnFirstStep* | boolean | Flag indicating if the Back (Previous step) button should be shown on the first step. False by default. |
343+
| *ms_errorColor* | color or reference | Error color in Tabs stepper |
337344
| *ms_showErrorState* | boolean | Flag indicating whether to show the error state. Only available with 'tabs' type. False by default. |
338345
| *ms_showErrorStateOnBack* | boolean | Flag indicating whether to keep showing the error state when user moves back. Only available with 'tabs' type. False by default. |
346+
| *ms_stepperLayoutTheme* | reference | Theme to use for even more custom styling of the stepper layout. It is recommended that it should extend @style/MSDefaultStepperLayoutTheme, which is the default theme used. |
347+
348+
### StepperLayout style attributes
349+
A list of `ms_stepperLayoutTheme` attributes responsible for styling of StepperLayout's child views.
350+
351+
| Attribute name | Description |
352+
| ----------------------------------|---------------------------------------------------------------|
353+
| *ms_bottomNavigationStyle* | Used by ms_bottomNavigation in layout/ms_stepper_layout |
354+
| *ms_tabsContainerStyle* | Used by ms_stepTabsContainer in layout/ms_stepper_layout |
355+
| *ms_backNavigationButtonStyle* | Used by ms_stepPrevButton in layout/ms_stepper_layout |
356+
| *ms_nextNavigationButtonStyle* | Used by ms_stepNextButton in layout/ms_stepper_layout |
357+
| *ms_completeNavigationButtonStyle*| Used by ms_stepCompleteButton in layout/ms_stepper_layout |
358+
| *ms_colorableProgressBarStyle* | Used by ms_stepProgressBar in layout/ms_stepper_layout |
359+
| *ms_stepTabsScrollViewStyle* | Used by ms_stepTabsScrollView in layout/ms_tabs_container |
360+
| *ms_stepTabsInnerContainerStyle* | Used by ms_stepTabsInnerContainer in layout/ms_tabs_container |
361+
| *ms_stepTabContainerStyle* | Used in layout/ms_step_tab_container |
362+
| *ms_stepTabNumberStyle* | Used by ms_stepNumber in layout/ms_step_tab |
363+
| *ms_stepTabDoneIndicatorStyle* | Used by ms_stepDoneIndicator in layout/ms_step_tab |
364+
| *ms_stepTabErrorIndicatorStyle* | Used by ms_stepErrorIndicator in layout/ms_step_tab |
365+
| *ms_stepTabTitleStyle* | Used by ms_stepTitle in layout/ms_step_tab |
366+
| *ms_stepTabDividerStyle* | Used by ms_stepDivider in layout/ms_step_tab |
339367

340368
## Missing features
341369
- support for non-linear steppers

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
POM_GROUP_ID=com.stepstone.stepper
2121
POM_ARTIFACT_ID=material-stepper
22-
POM_VERSION=2.1.0
22+
POM_VERSION=2.2.0

material-stepper/src/main/res/values/attrs.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,20 @@ limitations under the License.
5757

5858
<!-- Flag indicating whether to keep showing the error state when user moves back. Only available with 'tabs' type. False by default. -->
5959
<attr name="ms_showErrorStateOnBack" format="boolean" />
60-
61-
<!-- REQUIRED: Type of the stepper-->
62-
<attr name="ms_stepperType">
63-
<enum name="dots" value="0x01" />
64-
<enum name="progress_bar" value="0x02" />
65-
<enum name="tabs" value="0x03" />
66-
</attr>
6760

6861
<!-- Theme to use for even more custom styling of the stepper layout.
6962
It is recommended that it should extend @style/MSDefaultStepperLayoutTheme, which is the default theme used.
7063
See StepperLayoutTheme below for a list of possible inner view styles to overwrite.
7164
-->
7265
<attr name="ms_stepperLayoutTheme" format="reference" />
7366

67+
<!-- REQUIRED: Type of the stepper-->
68+
<attr name="ms_stepperType">
69+
<enum name="dots" value="0x01" />
70+
<enum name="progress_bar" value="0x02" />
71+
<enum name="tabs" value="0x03" />
72+
</attr>
73+
7474
</declare-styleable>
7575

7676
<declare-styleable name="DottedProgressBar">

0 commit comments

Comments
 (0)