Search in sources :

Example 1 with FragmentLauncher

use of com.mapsaurus.paneslayout.FragmentLauncher in project Android-PanesLibrary by cricklet.

the class ExampleFragment method addExampleFragment.

/**
	 * Create a new ExampleFragment and add it!
	 */
private void addExampleFragment() {
    // create a new fragment
    Fragment f = new ExampleFragment();
    //Fragment f = new ExampleListFragment();
    // get the activity and add the new fragment after this one!
    Activity a = getActivity();
    if (a != null && a instanceof FragmentLauncher)
        ((FragmentLauncher) a).addFragment(ExampleFragment.this, f);
}
Also used : FragmentLauncher(com.mapsaurus.paneslayout.FragmentLauncher) Activity(android.app.Activity) Fragment(android.support.v4.app.Fragment)

Aggregations

Activity (android.app.Activity)1 Fragment (android.support.v4.app.Fragment)1 FragmentLauncher (com.mapsaurus.paneslayout.FragmentLauncher)1