Skip to content

Commit 9f5c43a

Browse files
enizbilginzawadz88
authored andcommitted
Added an option to show bottom navigation (issue #129)
1 parent 6dacb59 commit 9f5c43a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

material-stepper/src/main/java/com/stepstone/stepper/StepperLayout.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ public void goToPrevStep() {
224224

225225
private boolean mShowBackButtonOnFirstStep;
226226

227+
private boolean mShowBottomNavigation;
228+
227229
private int mTypeIdentifier = AbstractStepperType.PROGRESS_BAR;
228230

229231
private int mFeedbackTypeMask = StepperFeedbackType.NONE;
@@ -618,6 +620,7 @@ public boolean onTouch(View view, MotionEvent motionEvent) {
618620
mDottedProgressBar.setVisibility(GONE);
619621
mProgressBar.setVisibility(GONE);
620622
mTabsContainer.setVisibility(GONE);
623+
mStepNavigation.setVisibility(mShowBottomNavigation ? View.VISIBLE : View.GONE);
621624

622625
mStepperType = StepperTypeFactory.createType(mTypeIdentifier, this);
623626
mStepperFeedbackType = StepperFeedbackTypeFactory.createType(mFeedbackTypeMask, this);
@@ -739,6 +742,8 @@ private void extractValuesFromAttributes(AttributeSet attrs, @AttrRes int defSty
739742

740743
mShowBackButtonOnFirstStep = a.getBoolean(R.styleable.StepperLayout_ms_showBackButtonOnFirstStep, false);
741744

745+
mShowBottomNavigation = a.getBoolean(R.styleable.StepperLayout_ms_showBottomNavigation, true);
746+
742747
mShowErrorStateEnabled = a.getBoolean(R.styleable.StepperLayout_ms_showErrorState, false);
743748
mShowErrorStateEnabled = a.getBoolean(R.styleable.StepperLayout_ms_showErrorStateEnabled, mShowErrorStateEnabled);
744749

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ limitations under the License.
5252
<!-- Flag indicating if the Back (Previous step) button should be shown on the first step. False by default. -->
5353
<attr name="ms_showBackButtonOnFirstStep" format="boolean" />
5454

55+
<!-- Flag indicating if the Bottom Navigation should be shown on the layout. True by default. -->
56+
<attr name="ms_showBottomNavigation" format="boolean" />
57+
5558
<!-- DEPRECATED: Use ms_showErrorStateEnabled instead -->
5659
<attr name="ms_showErrorState" format="boolean" />
5760

0 commit comments

Comments
 (0)