Top "Fragmentmanager" questions

FragmentManager is an interface for interacting with Fragment objects inside an Activity in Android.

getSupportFragmentManager doesn't compile on DialogFragment

How can I show this : public class TagsDialog extends DialogFragment { @Override public Dialog onCreateDialog(Bundle savedInstanceState) { AlertDialog.Builder builder = new …

android android-fragments dialog android-viewpager fragmentmanager
How to restore fragment back stack with in an activity (After application is killed in background)

In an Android app- Say I am in an Activity - MyActivity which holds one Fragment at a time. First …

android android-fragments fragmentmanager
what to replace deprecated getFragmentManager() method with (API 28)?

I have an Android application I've been working on, min sdk = 21. In it, I use a custom PreferenceActivity that in …

android android-fragments preferenceactivity fragmentmanager
Fragment not calling onPause or onStop when using replace

I have this odd problem that my fragments are not calling any of the end lifecycle methods like onPause and …

android android-fragments back-stack fragmentmanager
popBackStack causes calling oncreateView of fragment again and again

I have 3 fragment A, B,C.I wrote piece of code for replacing them and maintaining backstack: public void addFragment(…

android android-fragments fragment back-stack fragmentmanager
App force close on viewPager.setAdapter(adapter)

I have an application page with viewpager containing two fragments. When my activity pops up , a server request is made …

android android-viewpager fragmentmanager
Backstack management : Restarter must be created only during owner's initialization stage

I am using a bottom navigation bar in my MainActivity to handle some fragments. This is the code used for …

android android-fragments kotlin back-stack fragmentmanager
How to handle multiple fragment interaction listeners in one Activity properly?

I have one Activity and six different Fragments attached to it. Each fragment has OnFragmentInteractionListener interface and activity implements all …

java android android-fragments android-activity fragmentmanager
Android: master/detail flow (dual-pane) using 1 activity

As reported by the Android guide, dual-pane can be achieved in two ways: Multiple fragments, one activity Multiple fragments, multiple …

android android-fragments tablet master-detail fragmentmanager