Skip to content

Commit bca94ba

Browse files
committed
- update README.md
1 parent 2a349b8 commit bca94ba

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ With [Material Design Bottom Navigation pattern](https://www.google.com/design/s
1111
## Gradle
1212

1313
```groovy
14-
compile 'com.ncapdevi:frag-nav:1.2.6'
14+
compile 'com.ncapdevi:frag-nav:1.3.0'
1515
```
1616

1717
## How do I implement it?
@@ -93,17 +93,21 @@ fragNavController.switchTab(NavController.TAB5);
9393
### Push a fragment
9494
You can only push onto the currently selected index
9595
96-
fragNavController.push(FoodFragment.newInstance())
96+
fragNavController.pushFragment(FoodFragment.newInstance())
9797
9898
### Pop a fragment
9999
You can only pop from the currently selected index. This can throw an UnsupportedOperationException if trying to pop the root fragment
100100
101-
fragNavController.pop();
101+
fragNavController.popFragment();
102+
103+
### Pop multiple fragments
104+
You can pop multiple fragments at once, with the same rules as above applying. If the pop depth is deeper than possible, it will stop when it gets to the root fragment
105+
fragNavController.popFragments(3);
102106
103107
### Replacing a fragment
104108
You can only replace onto the currently selected index
105109
106-
fragNavController.replace(Fragment fragment);
110+
fragNavController.replaceFragment(Fragment fragment);
107111
108112
### You can also clear the stack to bring you back to the base fragment
109113
fragNavController.clearStack();

0 commit comments

Comments
 (0)