コード例 #1
0
        private void setMainFragmentByPreset(CropDemoPreset demoPreset)
        {
            var fragmentManager = SupportFragmentManager;

            fragmentManager.BeginTransaction()
            .Replace(Resource.Id.container, MainFragment.newInstance(demoPreset))
            .Commit();
        }
コード例 #2
0
        public static MainFragment NewInstance(CropDemoPreset demoPreset)
        {
            MainFragment fragment = new MainFragment();
            Bundle       args     = new Bundle();

            args.PutInt("DEMO_PRESET", (int)demoPreset);
            fragment.Arguments = args;
            return(fragment);
        }
コード例 #3
0
ファイル: MainFragment.cs プロジェクト: sk8tz/Xamarin-Cropper
        //endregion

        /**
         * Returns a new instance of this fragment for the given section number.
         */
        public static MainFragment newInstance(CropDemoPreset demoPreset)
        {
            MainFragment fragment = new MainFragment();
            Bundle       args     = new Bundle();

            args.PutString("DEMO_PRESET", demoPreset.ToString());
            fragment.Arguments = args;
            return(fragment);
        }
コード例 #4
0
        //endregion

        public void setCurrentFragment(MainFragment fragment)
        {
            mCurrentFragment = fragment;
        }
コード例 #5
0
 void SetMainFragmentByPreset(CropDemoPreset demoPreset)
 {
     SupportFragmentManager.BeginTransaction()
     .Replace(Resource.Id.container, MainFragment.NewInstance(demoPreset))
     .Commit();
 }