Using FragmentManager.getFragments()
shows an error on Android Studio. Despite this, it compiles and works properly.
This is the error:
FragmentManager.getFragments can only be called from within the same library group (groupId=com.android.support)
In my last OS question, I asked for a workaround for the fragment count, but the suggested .getBackStackEntryCount()
doesn't return the total number of fragments, so we cannot use getBackStackEntryAt(int index)
.
Is it safe to use FragmentManager.getFragments()
, even if it shows an error or it will be deprecated at some point?