Skip to content

Commit

Permalink
Fixed error that was causing next buttons to disappear on step removal
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestoyaquello committed Jan 13, 2022
1 parent 4ca0ee6 commit 4afda18
Showing 1 changed file with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,17 @@ void updateStepViewsAfterPositionChange(VerticalStepperFormView form) {
cancelButtonView.setVisibility(View.GONE);
}

if (formStyle.displayNextButtonInLastStep && isLast) {
String nextButtonText = formStyle.lastStepNextButtonText == null
? "" : formStyle.lastStepNextButtonText;
nextButtonView.setText(nextButtonText);
nextButtonView.setVisibility(View.VISIBLE);
if (!isLast) {
nextButtonView.setVisibility(formStyle.displayStepButtons ? View.VISIBLE : View.GONE);
} else {
nextButtonView.setVisibility(View.GONE);
if (formStyle.displayNextButtonInLastStep) {
String nextButtonText = formStyle.lastStepNextButtonText == null
? "" : formStyle.lastStepNextButtonText;
nextButtonView.setText(nextButtonText);
nextButtonView.setVisibility(View.VISIBLE);
} else {
nextButtonView.setVisibility(View.GONE);
}
}

lineView1.setVisibility(isLast ? View.GONE : View.VISIBLE);
Expand Down

0 comments on commit 4afda18

Please sign in to comment.