/// <summary> /// On creation of the activity. /// </summary> /// <param name="savedInstanceState">The previous state of the activity.</param> protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.RecipeActivityLayout); RecipeDetailFragment recFrag = new RecipeDetailFragment(); Recipe testRec = new Recipe(); testRec.Name = "Test Recipe"; testRec.PG = 70; testRec.TargetNicotine = 3; testRec.BatchSize = 30; testRec.Flavors = new List <RecipeItem>(); ActiveRecipe = testRec; RecipeItemListFragment recListFrag = new RecipeItemListFragment(); var trans = SupportFragmentManager.BeginTransaction(); trans.Add(Resource.Id.raFragmentView, recFrag, "detailFragment"); trans.Add(Resource.Id.raFragmentView, recListFrag, "listFragment"); trans.Commit(); }
/// <summary> /// Initialize the list of elements. /// </summary> public override void InitElements() { RecipeItemListFragment frag = context as RecipeItemListFragment; elements = frag.Recipe.Flavors; }