Home | History | Annotate | Download | only in v4

Lines Matching defs:fragment

5 import android.support.v4.app.Fragment;
13 * Version of FragmentController that can be used for android.support.v4.Fragment. Only
17 public class SupportFragmentController<F extends Fragment> extends ComponentController<SupportFragmentController<F>, F> {
18 private final F fragment;
21 protected SupportFragmentController(F fragment, Class<? extends FragmentActivity> activityClass) {
22 this(fragment, activityClass, null);
25 protected SupportFragmentController(F fragment, Class<? extends FragmentActivity> activityClass, Intent intent) {
26 super(fragment, intent);
27 this.fragment = fragment;
31 public static <F extends Fragment> SupportFragmentController<F> of(F fragment) {
32 return new SupportFragmentController<>(fragment, FragmentControllerActivity.class);
35 public static <F extends Fragment> SupportFragmentController<F> of(F fragment, Class<? extends FragmentActivity> activityClass) {
36 return new SupportFragmentController<>(fragment, activityClass);
39 public static <F extends Fragment> SupportFragmentController<F> of(F fragment, Class<? extends FragmentActivity> activityClass, Intent intent) {
40 return new SupportFragmentController<>(fragment, activityClass, intent);
44 * Creates the activity with {@link Bundle} and adds the fragment to the view with ID {@code contentViewId}.
50 activityController.create(bundle).get().getSupportFragmentManager().beginTransaction().add(contentViewId, fragment).commit();
57 * Creates the activity with {@link Bundle} and adds the fragment to it. Note that the fragment will be added to the view with ID 1.