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
### Make an IO operation before going to the next step (optional)
212
-
If the user wants to e.g. save something in the database or make a network call on a separate Thread after clicking on the Next button
213
-
he can perform these operations and then invoke the `goToNextStep()` method of the `StepperLayout.OnNextClickedCallback` in the current Step. If the user wants to perform
214
-
the blocking operations on the final step, when clicking on the Complete button, he needs to invoke the `complete()` method of the `StepperLayout.OnCompleteClickedCallback`.
213
+
### Make extra operations before going to the next step (optional)
214
+
After clicking on the Next button if the user wants to e.g.:
215
+
* save something in the database
216
+
* make a network call on a separate Thread
217
+
* simply save the data from the current step to some other component or parent Activity
218
+
219
+
he can perform these operations and then invoke the `goToNextStep()` method of the `StepperLayout.OnNextClickedCallback` in the current Step.
220
+
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`.
215
221
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`.
The fragment must implement `BlockingStep` instead of `Step`.
218
-
Also, make sure that `goToNextStep()` gets called on the main thread.
219
-
**Note:** the `onNextClicked(StepperLayout.OnNextClickedCallback)` method gets invoked after step verification.
223
+
To do so the fragment/view must implement `BlockingStep` instead of `Step`.
224
+
Also, make sure that `goToNextStep()`and/or `complete()` get called on the main thread.
225
+
**Note:**`onNextClicked(StepperLayout.OnNextClickedCallback)`and ``onCompleteClicked(StepperLayout.OnCompleteClickedCallback)`` methods get invoked after step verification.
220
226
E.g.:
221
227
222
228
```java
@@ -262,6 +268,7 @@ but display 'Summary' just before the last page.
262
268
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.
0 commit comments