File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
material-stepper/src/main/java/com/stepstone/stepper
sample/src/main/java/com/stepstone/stepper/sample/step/fragment Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,17 @@ public interface BlockingStep extends Step {
3838 @ UiThread
3939 void onNextClicked (StepperLayout .OnNextClickedCallback callback );
4040
41+ /**
42+ * Notifies this step that the complete button/tab was clicked, the step was verified
43+ * and the user can complete the flow. This is so that the current step might perform
44+ * some last minute operations e.g. a network call before completing the flow.
45+ * {@link StepperLayout.OnCompleteClickedCallback#complete()} must be called once these operations finish.
46+ *
47+ * @param callback callback to call once the user wishes to complete the flow
48+ */
49+ @ UiThread
50+ void onCompleteClicked (StepperLayout .OnCompleteClickedCallback callback );
51+
4152 /**
4253 * Notifies this step that the previous button/tab was clicked. This is so that the current step might perform
4354 * some last minute operations e.g. a network call before switching to previous step.
Original file line number Diff line number Diff line change @@ -87,6 +87,19 @@ public void run() {
8787 }, 2000L );
8888 }
8989
90+ /**
91+ * Notifies this step that the complete button/tab was clicked, the step was verified
92+ * and the user can complete the flow. This is so that the current step might perform
93+ * some last minute operations e.g. a network call before completing the flow.
94+ * {@link StepperLayout.OnCompleteClickedCallback} must be called once these operations finish.
95+ *
96+ * @param callback callback to call once the user wishes to complete the flow
97+ */
98+ @ Override
99+ public void onCompleteClicked (StepperLayout .OnCompleteClickedCallback callback ) {
100+ // not needed here
101+ }
102+
90103 private boolean shouldOperationSucceed () {
91104 return operationSwitch .isChecked ();
92105 }
You can’t perform that action at this time.
0 commit comments