Exemple #1
0
        public override void OnAttach(Android.App.Activity activity)
        {
            base.OnAttach(activity);
            Android.Util.Log.Debug("Leaderboard", "OnAttach");
            TabTypes tabTypes = new TabTypes();

            TabType[] types    = tabTypes.ToArray();
            var       testData = new Dictionary <string, UserStatEntry[]> {
                { "*****@*****.**", new UserStatEntry[] {
                      new UserStatEntry {
                          Type = types[0], Given = 2, Gotten = 3
                      },
                      new UserStatEntry {
                          Type = types[3], Given = 0, Gotten = 5
                      },
                      new UserStatEntry {
                          Type = types[4], Given = 1, Gotten = 0
                      }
                  } }
            };

            var trans = FragmentManager.BeginTransaction();

            foreach (var kvp in testData)
            {
                var frag = new UserStatisticFragment(() => kvp);
                trans.Add(Resource.Id.EntriesLayout, frag);
            }
            trans.Commit();
        }
        public override void OnAttach(Android.App.Activity activity)
        {
            base.OnAttach (activity);
            Android.Util.Log.Debug ("Leaderboard", "OnAttach");
            TabTypes tabTypes = new TabTypes ();
            TabType[] types = tabTypes.ToArray ();
            var testData = new Dictionary<string, UserStatEntry[]> {
                { "*****@*****.**", new UserStatEntry[] {
                        new UserStatEntry { Type = types[0], Given = 2, Gotten = 3 },
                        new UserStatEntry { Type = types[3], Given = 0, Gotten = 5 },
                        new UserStatEntry { Type = types[4], Given = 1, Gotten = 0 }
                    }
                }
            };

            var trans = FragmentManager.BeginTransaction ();
            foreach (var kvp in testData) {
                var frag = new UserStatisticFragment (() => kvp);
                trans.Add (Resource.Id.EntriesLayout, frag);
            }
            trans.Commit ();
        }