コード例 #1
0
        public static HeadsUpNotificationFragment NewInstance()
        {
            var fragment = new HeadsUpNotificationFragment();

            fragment.RetainInstance = true;
            return(fragment);
        }
コード例 #2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_notification);
            SetTitle(Resource.String.title_lnotification_activity);

            // Use ViewPager in the support library where possible.
            // At this time, the support library for L is not ready so using the depreciated method
            // to create tabs.
            ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
            ActionBar.Tab tabHeadsUpNotification = ActionBar.NewTab().SetText("Heads Up");
            ActionBar.Tab tabVisibilityMetaData  = ActionBar.NewTab().SetText("Visibility");
            ActionBar.Tab tabOtherMetaData       = ActionBar.NewTab().SetText("Others");

            tabHeadsUpNotification.SetTabListener(new FragmentTabListener(HeadsUpNotificationFragment
                                                                          .NewInstance()));
            tabVisibilityMetaData.SetTabListener(new FragmentTabListener(VisibilityMetaDataFragment
                                                                         .NewInstance()));
            tabOtherMetaData.SetTabListener(new FragmentTabListener(OtherMetaDataFragment
                                                                    .NewInstance()));

            ActionBar.AddTab(tabHeadsUpNotification, 0);
            ActionBar.AddTab(tabVisibilityMetaData, 1);
            ActionBar.AddTab(tabOtherMetaData, 2);
        }
コード例 #3
0
		public static HeadsUpNotificationFragment NewInstance()
		{
			var fragment = new HeadsUpNotificationFragment ();
			fragment.RetainInstance = true;
			return fragment;
		}