You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All notable changes to this project will be documented in this file.
3
+
4
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
+
7
+
## [4.0.0]
8
+
### Added
9
+
-`setEndButtonVisible` and `setBackButtonVisible` methods in `StepViewModel.Builder` for toggling button visibility (issue #104)
10
+
- New stepper type `none` which shows no progress indicator for the steps (issue #154)
11
+
- New stepper feedback type `disabled_content_interaction` which intercepts touch events on the steps' content and ignores them during operation.
12
+
- New stepper feedback type `content_overlay` which shows a dimmed overlay over the content.
13
+
- An option to specify the background drawable for `content_overlay` stepper feedback type via `ms_stepperFeedback_contentOverlayBackground`.
14
+
- An option to specify the fade out alpha for `content_fade` stepper feedback type via `ms_stepperFeedback_contentFadeAlpha` attribute.
15
+
16
+
### Changed
17
+
-**Breaking change:** Updated Android Support Library version to `25.4.0` to support vector animations without a pre-Lollipop fallback (issue #154)
18
+
-**Breaking change:** Changed `setNextButtonLabel` methods in `StepViewModel.Builder` to `setEndButtonLabel` so that it works for both Next and Complete buttons (issue #107)
19
+
-**Breaking change:** Split `content` stepper feedback type into `content_progress` and `content_fade`.
@@ -207,7 +213,7 @@ After clicking on the Next button if the user wants to e.g.:
207
213
he can perform these operations and then invoke the `goToNextStep()` method of the `StepperLayout.OnNextClickedCallback` in the current Step.
208
214
If the user wants to perform these operations on the final step, when clicking on the Complete button, he needs to invoke the `complete()` method of the `StepperLayout.OnCompleteClickedCallback`.
209
215
While operations are performed, and the user would like to go back you can cancel them and then invoke `onBackClicked()` method of the `StepperLayout.OnBackClickedCallback`.
To do so the fragment/view must implement `BlockingStep` instead of `Step`.
213
219
Also, make sure that `goToNextStep()` and/or `complete()` get called on the main thread.
@@ -252,10 +258,10 @@ public class DelayedTransitionStepFragmentSample extends Fragment implements Blo
252
258
```
253
259
254
260
### Changing button labels & compound drawables per step
255
-
Sometimes you might want to have different labels on the Next and/or Back navigation buttons on different steps e.g. use the default labels on the first few steps,
261
+
Sometimes you might want to have different labels on the Next/Complete and/or Back navigation buttons on different steps e.g. use the default labels on the first few steps,
256
262
but display 'Summary' just before the last page.
257
263
You might also want to use your custom icons instead of the default navigation button compound drawables or not show the compound drawables for some of the buttons.
@@ -288,14 +296,16 @@ In such case you need to override the `getViewModel(int)` method from the `StepA
288
296
}
289
297
```
290
298
291
-
NOTE: To change Complete button's label you need use `ms_completeButtonText` attribute from StepperLayout.
299
+
It is also possible to hide Back/Next/Complete buttons on each step if needed.
300
+
To do so you need to call `setBackButtonVisible(false)` and/or `setEndButtonVisible(false)` on
301
+
`StepViewModel.Builder` in your adapter.
292
302
293
303
### Custom styling
294
304
Basic styling can be done by choosing the active and inactive step colors.
295
305
There are some additional properties which can be changed directly from StepperLayout's attributes e.g. the background of bottom navigation buttons (see [StepperLayout attributes](#stepperlayout-attributes))
296
306
For advanced styling you can use `ms_stepperLayoutTheme` StepperLayout's attribute and provide your custom style to be used.
297
307
See 'Custom StepperLayout theme' in the sample app for an example.
If you want to keep the error displayed when going back to the previous step you need to also set `ms_showErrorStateOnBackEnabled` to `true`.
345
355
346
356
### Stepper feedback
347
357
It is possible to show stepper feedback for ongoing operations (see [Stepper feedback](https://material.io/guidelines/components/steppers.html#steppers-types-of-steppers)).
348
358
To do so you firstly need to set ```ms_stepperFeedbackType``` to one or more of:
349
-
*```tabs``` - shows a progress message instead of the tabs during operation,
350
-
*```content``` - shows a progress bar on top of the steps' content and partially fades the content out during operation,
359
+
*```tabs``` - shows a progress message instead of the tabs during operation.
360
+
*```content_progress``` - shows a progress bar on top of the steps' content.
361
+
*```content_fade``` - partially fades the content out during operation (should not be used together with ```content_overlay```). You can change the default fade amount with `ms_stepperFeedback_contentFadeAlpha` attribute.
362
+
*```content_overlay``` - shows a dimmed overlay over the content during the operation (should not be used together with ```content_fade```). You can change the overlay background with `ms_stepperFeedback_contentOverlayBackground` attribute.
351
363
*```disabled_bottom_navigation``` - disables the buttons in the bottom navigation during operation. In order to see that the buttons are disabled on the bottom navigation bar, make sure that the button colors are assigned using color selectors with a disabled state (see the sample app).
364
+
*```disabled_content_interaction``` - intercepts touch events on the steps' content and ignores them during operation.
352
365
353
366
The default is ```none``` which does nothing. It is possible to use multiple flags together.
354
367
355
368
After setting this to show the feedback you need to call ```StepperLayout#showProgress(@NonNull String progressMessage)```
356
369
and do hide the progress indicator you need to call ```StepperLayout#hideProgress()```.
|*ms_stepperType*| one of `dots`, `progress_bar` or `tabs` |**REQUIRED:**Type of the stepper |
467
+
|*ms_stepperType*| one of `dots`, `progress_bar`, `tabs` or `none`|**REQUIRED:**Type of the stepper |
455
468
|*ms_backButtonColor*| color or reference |BACK button's text color |
456
469
| *ms_nextButtonColor* | color or reference | NEXT button's text color |
457
470
|*ms_completeButtonColor*| color or reference |COMPLETE button's text color |
@@ -470,7 +483,9 @@ For advanced styling please see [StepperLayout style attributes](#stepperlayout-
470
483
| *ms_showErrorStateEnabled* | boolean | Flag indicating whether to show the error state. Only applicable for 'tabs' type. False by default. |
471
484
| *ms_showErrorStateOnBackEnabled*| boolean | Flag indicating whether to keep showing the error state when user moves back. Only applicable for 'tabs' type. False by default. |
472
485
| *ms_tabNavigationEnabled* | boolean | Flag indicating whether step navigation is possible by clicking on the tabs directly. Only applicable for 'tabs' type. True by default. |
473
-
| *ms_stepperFeedbackType* | flag(s): `none` or `tabs`, `content` & `disabled_bottom_navigation` | Type(s) of stepper feedback. Can be a combination of `tabs`, `content` & `disabled_bottom_navigation`. Default is `none`.|
486
+
| *ms_stepperFeedbackType* | flag(s): `none` or `tabs`, `content_progress`, `content_fade`, `content_overlay`, `disabled_bottom_navigation` & `disabled_content_interaction` | Type(s) of stepper feedback. Can be a combination of `tabs`, `content_progress`, `content_fade`, `content_overlay`, `disabled_bottom_navigation` & `disabled_content_interaction`. Default is `none`.|
487
+
| *ms_stepperFeedback_contentFadeAlpha* | float | An alpha value from 0 to 1.0f to be used for the faded out view if `content_fade` stepper feedback type is set. 0.5f by default. |
488
+
| *ms_stepperFeedback_contentOverlayBackground* | reference | Background to be used for the overlay on top of the content if `content_overlay` stepper feedback type is set. |
474
489
| *ms_showBottomNavigation* | boolean | Flag indicating if the Bottom Navigation bar should be shown on the layout. True by default. |
475
490
| *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. |
476
491
@@ -486,6 +501,7 @@ A list of `ms_stepperLayoutTheme` attributes responsible for styling of StepperL
486
501
|*ms_completeNavigationButtonStyle*|Used by ms_stepCompleteButton in layout/ms_stepper_layout |
487
502
|*ms_colorableProgressBarStyle*|Used by ms_stepProgressBar in layout/ms_stepper_layout |
488
503
|*ms_stepPagerProgressBarStyle*|Used by ms_stepPagerProgressBar in layout/ms_stepper_layout |
504
+
|*ms_stepPagerOverlayStyle*|Used by ms_stepPagerOverlay in layout/ms_stepper_layout |
489
505
|*ms_stepTabsScrollViewStyle*|Used by ms_stepTabsScrollView in layout/ms_tabs_container |
490
506
|*ms_stepTabsInnerContainerStyle*|Used by ms_stepTabsInnerContainer in layout/ms_tabs_container |
491
507
|*ms_stepTabsProgressMessageStyle*|Used by ms_stepTabsProgressMessage in layout/ms_tabs_container|
@@ -495,7 +511,10 @@ A list of `ms_stepperLayoutTheme` attributes responsible for styling of StepperL
495
511
|*ms_stepTabIconBackgroundStyle*|Used by ms_stepIconBackground in layout/ms_step_tab |
496
512
|*ms_stepTabTitleStyle*|Used by ms_stepTitle in layout/ms_step_tab |
497
513
|*ms_stepTabDividerStyle*|Used by ms_stepDivider in layout/ms_step_tab |
0 commit comments