Code example for FragmentManager

Methods: beginTransactionfindFragmentById

        FragmentManager fm = getSupportFragmentManager();
        // Create the list fragment and add it as our sole content. 
        if (fm.findFragmentById( == null) {
            AppListFragment list = new AppListFragment();
            fm.beginTransaction().add(, list).commit();
     * This class holds the per-item data in our Loader. 
    public static class AppEntry { 
        public AppEntry(AppListLoader loader, ApplicationInfo info) {
            mLoader = loader;
            mInfo = info;
            mApkFile = new File(info.sourceDir);
Contextual code suggestions in your IDE  Get Codota for Java