Skip to content

Commit 2cb1e8e

Browse files
committed
- add helper function to tell if fragmentManger state is saved
1 parent c3abc68 commit 2cb1e8e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

frag-nav/src/main/java/com/ncapdevi/fragnav/FragNavController.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,15 @@ public boolean isRootFragment() {
784784
return stack == null || stack.size() == 1;
785785
}
786786

787+
/**
788+
* Helper function to get wether the fragmentManger has gone through a stateSave, if this is true, you probably want to commit allowing stateloss
789+
*
790+
* @return if fragmentManger isStateSaved
791+
*/
792+
public boolean isStateSaved(){
793+
return mFragmentManager.isStateSaved();
794+
}
795+
787796
//endregion
788797

789798
//region SavedInstanceState

0 commit comments

Comments
 (0)