Back to project page Android-CleanArchitecture.
The source code is released under:
Apache License
If you think the Android project Android-CleanArchitecture listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.fernandocejas.android10.sample.presentation.view.activity; // ww w .j av a 2 s . c o m import android.app.Activity; import android.app.Fragment; import android.app.FragmentTransaction; /** * Base {@link android.app.Activity} class for every Activity in this application. */ public abstract class BaseActivity extends Activity { /** * Adds a {@link Fragment} to this activity's layout. * * @param containerViewId The container view to where add the fragment. * @param fragment The fragment to be added. */ protected void addFragment(int containerViewId, Fragment fragment) { FragmentTransaction fragmentTransaction = this.getFragmentManager().beginTransaction(); fragmentTransaction.add(containerViewId, fragment); fragmentTransaction.commit(); } }