public override void OnActivityCreated(Bundle savedInstanceState) {
                base.OnActivityCreated(savedInstanceState);

                FragmentManager fm = GetFragmentManager();

                // Check to see if we have retained the worker fragment.
                mWorkFragment = (RetainedFragment)fm.FindFragmentByTag("work");

                // If not retained (or first time running), we need to create it.
                if (mWorkFragment == null) {
                    mWorkFragment = new RetainedFragment();
                    // Tell it who it is working with.
                    mWorkFragment.SetTargetFragment(this, 0);
                    fm.BeginTransaction().Add(mWorkFragment, "work").Commit();
                }
            }
            public override void OnActivityCreated(Bundle savedInstanceState)
            {
                base.OnActivityCreated(savedInstanceState);

                FragmentManager fm = GetFragmentManager();

                // Check to see if we have retained the worker fragment.
                mWorkFragment = (RetainedFragment)fm.FindFragmentByTag("work");

                // If not retained (or first time running), we need to create it.
                if (mWorkFragment == null)
                {
                    mWorkFragment = new RetainedFragment();
                    // Tell it who it is working with.
                    mWorkFragment.SetTargetFragment(this, 0);
                    fm.BeginTransaction().Add(mWorkFragment, "work").Commit();
                }
            }
 public MyThread(RetainedFragment retainedFragment)
 {
     this.retainedFragment = retainedFragment;
 }
 public MyThread(RetainedFragment fragment)
 {
     _fragment = fragment;
 }
 public MyThread(RetainedFragment retainedFragment)
 {
     this.retainedFragment = retainedFragment;
 }
示例#6
0
 public MyThread(RetainedFragment fragment)
 {
     _fragment = fragment;
 }