public override void OnViewCreated(View view, Bundle savedInstanceState) { //bind Exercies list (nested fragment) var exerciseList = LogListFragment.Instance(lm.LogsHistory); var trans = ChildFragmentManager.BeginTransaction(); trans.Add(Resource.Id.linearLayoutExercises, exerciseList).Commit(); }
public static LogListFragment Instance(List <ExerciseLog> logs) { var loglist = new LogListFragment(); loglist.Arguments = new Bundle(); loglist.Arguments.PutString("logs", JsonConvert.SerializeObject(logs)); return(loglist); }
public override void OnViewCreated(View view, Bundle savedInstanceState) { //bind Exercies list var exerciseList = LogListFragment.Instance(lm.LogsToday); var trans = ChildFragmentManager.BeginTransaction(); trans.Add(Resource.Id.frameLayoutExercises, exerciseList).Commit(); /*bind Plus button*/ var fab = view.FindViewById <FloatingActionButton>(Resource.Id.fab); fab.Click += (sender, args) => { var intent = new Intent(base.Activity, typeof(Activities.AddExerciseActivity)); StartActivity(intent); base.Activity.Finish(); }; }