Search in sources :

Example 1 with MainActivity

use of it.gmariotti.cardslib.demo.extras.MainActivity in project cardslib by gabrielemariotti.

the class TwoWayViewFragment method fragmentHelper.

private void fragmentHelper(BaseFragment fragment) {
    FragmentManager fragmentManager = getFragmentManager();
    FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
    fragmentTransaction.replace(R.id.fragment_main_extras, fragment);
    fragmentTransaction.commit();
    if (fragment.getTitleResourceId() > 0)
        ((MainActivity) getActivity()).mCurrentTitle = fragment.getTitleResourceId();
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) MainActivity(it.gmariotti.cardslib.demo.extras.MainActivity)

Aggregations

FragmentManager (android.app.FragmentManager)1 FragmentTransaction (android.app.FragmentTransaction)1 MainActivity (it.gmariotti.cardslib.demo.extras.MainActivity)1