Writing an android library, I'm listening to fragments' life-cycle using supportFragmentManager.registerFragmentLifecycleCallbacks. Having the fragment object in the callbacks, how can I check whether the fragment is a static fragment (defined in the xml file) or a dynamic one (defined in a container like FrameLayout)?