transaction = fragmentManager.beginTransaction(); Fragment fragment = new HomeFragment(); transaction.replace(R.id.content, fragment); transaction.commit();