예제 #1
0
            public static FragmentContacts NewInstance(int num)
            {
                FragmentContacts f = new FragmentContacts();

                Bundle args = new Bundle();

                args.PutInt("num", num);
                f.Arguments = args;

                return(f);
            }
예제 #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.umeng_example_analytics_fragment_tabs);
            _tabHost = FindViewById <FragmentTabHost>(Android.Resource.Id.TabHost);
            _tabHost.Setup(this, SupportFragmentManager, Resource.Id.realtabcontent);

            _tabHost.AddTab(_tabHost.NewTabSpec("simple").SetIndicator("Simple"), FragmentSimple.NewInstance(1).Class, null);
            _tabHost.AddTab(_tabHost.NewTabSpec("contacts").SetIndicator("Contacts"), FragmentContacts.NewInstance(1).Class, null);
        }