protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.activity_main); var transaction = this.SupportFragmentManager.BeginTransaction(); var fragment = new ElevationDragFragment(); transaction.Replace(Resource.Id.sample_content_fragment, fragment); transaction.Commit(); }
protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.activity_main); if (bundle == null) { var transaction = FragmentManager.BeginTransaction (); var fragment = new ElevationDragFragment (); transaction.Replace (Resource.Id.sample_content_fragment, fragment); transaction.Commit (); } }