Пример #1
0
        public static MainFragment NewInstance(int someVar)
        {
            MainFragment fragment = new MainFragment();
            Bundle       args     = new Bundle();

            args.PutInt("someVar", someVar);
            fragment.Arguments = args;
            return(fragment);
        }
Пример #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            InitInstance();

            if (bundle == null)
            {
                SupportFragmentManager.BeginTransaction()
                .Add(Resource.Id.contentContainer, MainFragment.NewInstance(0))
                .Commit();
            }
        }