Category "android-fragments"

getSupportFragmentManager getFragment without tag or id

I'm developing an Android 3.1 Tablet application. I'm using ViewPager and fragments on one activity. My problem is that I don't know how to set an ID or Tag to

“java.lang.IllegalStateException: Activity has been destroyed” after resuming the FragmentActivity on Android

I am using this approach: Separate Back Stack for each tab in Android using Fragments I am trying to push fragment from first fragment, after resume the Fragm

How to use different menu in fragment than in activity?

I want to have a menu for my main activity and a menu for a fragment which is contained in the main activity. The main activity menu should be removed and the f

Navigation Component: IllegalStateException Fragment not associated with a fragment manager

I'm using the Navigation Component version 2.1.0-rc01 and I navigate back and forth between 3 screens using Navigation.findNavController(it).navigate(R.id.act