コード例 #1
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);
        }
コード例 #2
0
            public static FragmentSimple NewInstance(int num)
            {
                FragmentSimple f    = new FragmentSimple();
                Bundle         args = new Bundle();

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

                return(f);
            }
コード例 #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Transaction);

            fragmento1 = new FragmentSimple("fragmento 1", "purple");
            fragmento2 = new FragmentSimple("fragmento 2", "red");

            PrepararBotones();
        }
コード例 #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Backstack);

            fragmento1 = new FragmentSimple("fragmento1", "red");
            fragmento2 = new FragmentSimple("fragmento2", "purple");
            fragmento3 = new FragmentSimple("fragmento3", "green");
            fragmento4 = new FragmentSimple("fragmento4", "gray");

            PrepararBotones();
        }