Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is getChildFragmentManager in support library v13?

Android support library v13 is supposed to provide support for newer APIs from Android 3.1. However, as far as I can tell there is no support for child fragments. Specifically, where is getChildFragmentManager()? The v13 support library relies on native fragments, which didn't add this method until API level 17. I have an app with minimum SDK level 14 so I should be able to use the v13 support library, but it seems I can't.

I don't want to go all the way back to the v4 support library and take on all it's weight. The v13 library is perfect otherwise.

like image 972
Greg Ennis Avatar asked Feb 18 '14 23:02

Greg Ennis


1 Answers

If you want to use nested fragments within a native Fragment. use getFragmentManager().

If you want to use nested fragments within a support library Fragment, use getChildFragmentManager().

Just found this out by accident. It works. :)

like image 97
midnightstar Avatar answered Nov 14 '22 05:11

midnightstar