Skip to content

Commit c1f889c

Browse files
enizbilginzawadz88
authored andcommitted
Added a sample showing how to hide bottom navigation
1 parent 9f5c43a commit c1f889c

5 files changed

Lines changed: 36 additions & 0 deletions

File tree

sample/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<activity android:name=".PassDataBetweenStepsActivity"
4141
android:windowSoftInputMode="stateVisible"/>
4242
<activity android:name=".DisabledTabNavigationActivity" />
43+
<activity android:name=".HiddenBottomNavigationActivity" />
4344
<activity
4445
android:name=".CustomStepperLayoutThemeActivity"
4546
android:theme="@style/AppThemeDark" />
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
Copyright 2017 StepStone Services
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package com.stepstone.stepper.sample
18+
19+
class HiddenBottomNavigationActivity : AbstractStepperActivity() {
20+
21+
override val layoutResId: Int
22+
get() = R.layout.activity_hidden_bottom_navigation
23+
24+
}

sample/src/main/java/com/stepstone/stepper/sample/MainActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ class MainActivity : AppCompatActivity() {
7373
SampleItem(getString(R.string.proceed_programmatically), getString(R.string.proceed_programmatically_description), ProceedProgrammaticallyActivity::class.java),
7474
SampleItem(getString(R.string.passing_data_between_steps), getString(R.string.passing_data_between_steps_description), PassDataBetweenStepsActivity::class.java),
7575
SampleItem(getString(R.string.disabled_tab_navigation), getString(R.string.disabled_tab_navigation_description), DisabledTabNavigationActivity::class.java),
76+
SampleItem(getString(R.string.hidden_bottom_navigation), getString(R.string.hidden_bottom_navigation_description), HiddenBottomNavigationActivity::class.java),
7677
SampleItem(getString(R.string.custom_stepperlayout_theme), getString(R.string.custom_stepperlayout_theme_description), CustomStepperLayoutThemeActivity::class.java)
7778
)
7879

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<com.stepstone.stepper.StepperLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
android:id="@+id/stepperLayout"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
app:ms_showBottomNavigation="false"
8+
app:ms_stepperType="tabs" />

sample/src/main/res/values/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<string name="proceed_programmatically">Proceed programmatically</string>
2222
<string name="passing_data_between_steps">Passing data between steps</string>
2323
<string name="disabled_tab_navigation">Disabled tab navigation</string>
24+
<string name="hidden_bottom_navigation">Hidden bottom navigation</string>
2425
<string name="custom_stepperlayout_theme">Custom StepperLayout theme</string>
2526

2627
<string name="default_dots_description">The default implementation of a dotted stepper</string>
@@ -43,6 +44,7 @@
4344
<string name="proceed_programmatically_description">Shows how to navigate to the next steps without clicking on the bottom navigation buttons</string>
4445
<string name="passing_data_between_steps_description">Shows how to pass data from one fragment to the next by using parent Activity</string>
4546
<string name="disabled_tab_navigation_description">Shows how to disable clicking on tabs in a tabbed stepper</string>
47+
<string name="hidden_bottom_navigation_description">Shows how to hide bottom navigation</string>
4648
<string name="custom_stepperlayout_theme_description">Shows a styled stepper layout with custom fonts &amp; colors</string>
4749

4850
<string name="tab_title">Tab title</string>

0 commit comments

Comments
 (0)