When there is a need to use getSupportFragmentManager()
to support lower API levels, I think using getChildFragmentManager()
method. How this method supports all API levels?
Asked
Active
Viewed 1,546 times
1
-
could you refine the question? – saopayne Dec 31 '13 at 02:38
1 Answers
2
They are both in the support library.

Greg Ennis
- 14,917
- 2
- 69
- 74
-
1I have another question . both getSupportFragmentManager() and getChildFragmentManager() returns android.support.v4.app.FragmentMamager . why there is no seperate FragementManager for child. – saravanan Dec 31 '13 at 03:40
-
Apparently they made a design decision to use the same class. It must operate a little bit differently when working with private child fragments, but it has the same public-facing methods so they just used the same class. – Greg Ennis Dec 31 '13 at 03:46
-
1But if I use the support library, then all `Fragment` are also forced to be support library's one. It makes no sense for new devices. Is there some smart way to avoid need to modify all `Fragment` importing? – Romulus Urakagi Ts'ai Aug 27 '14 at 09:47