コード例 #1
0
        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();
        }
コード例 #2
0
        public static LogListFragment  Instance(List <ExerciseLog> logs)
        {
            var loglist = new LogListFragment();

            loglist.Arguments = new Bundle();
            loglist.Arguments.PutString("logs", JsonConvert.SerializeObject(logs));

            return(loglist);
        }
コード例 #3
0
ファイル: TodayFragment.cs プロジェクト: makkynz/GymLog
        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();
            };
        }