1

I'm using an nested fragment which is of class Fragment, as opposed to SupportFragment (v4). I should use getChildSupportManager to handle this properly, but that suspects v4 support fragments, and I have a regular Fragment (which I can't change, it comes from a library).

How would I be able to solve this?

TomCB
  • 3,983
  • 9
  • 40
  • 66

1 Answers1

0

I should use getChildSupportManager to handle this properly, but that suspects v4 support fragments

AFAIK, there is no getChildSupportManager() method in Android. There is getChildFragmentManager().

If you are using getChildFragmentManager() from a FragmentActivity, you need to give it a fragment from the Android Support package backport (android.support.v4.app.Fragment). If you are using getChildFragmentManager() from a regular Activity on API Level 17+, you need to give it a native fragment (android.app.Fragment).

I have a regular Fragment (which I can't change, it comes from a library).

Then set your minSdkVersion to 17 and use Activity instead of FragmentActivity.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491