Skip to content

Commit 498e593

Browse files
authored
Update README.md
update version and add isRootFragment
1 parent 73b65cd commit 498e593

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ With [Material Design Bottom Navigation pattern](https://www.google.com/design/s
99
## Gradle
1010

1111
```groovy
12-
compile 'com.ncapdevi:frag-nav:1.2.3'
12+
compile 'com.ncapdevi:frag-nav:1.2.4'
1313
```
1414

1515
## How do I implement it?
@@ -94,7 +94,7 @@ You can only push onto the currently selected index
9494
fragNavController.push(FoodFragment.newInstance())
9595
9696
### Pop a fragment
97-
You can only pop from the currently selected index
97+
You can only pop from the currently selected index. This can throw an UnsupportedOperationException if trying to pop the root fragment
9898
9999
fragNavController.pop();
100100
@@ -134,13 +134,14 @@ Use FragNavController.setTransitionMode();
134134
* @return Current stack
135135
*/
136136
public Stack<Fragment> getCurrentStack()
137-
137+
138138
/**
139-
*
140-
* @return If you are able to pop the current stack. If false, you are at the bottom of the stack
139+
* @return If true, you are at the bottom of the stack
141140
* (Consider using replace if you need to change the root fragment for some reason)
141+
* else you can pop as needed as your are not at the root
142+
* * @deprecated use {@link #isRootFragment()} instead.
142143
*/
143-
public boolean canPop()
144+
public boolean isRootFragment() {
144145
145146
/**
146147
*

0 commit comments

Comments
 (0)