Пример #1
0
		public bool OnNavigationItemSelected (int itemPosition, long itemId)
		{
			Fragment fragment = null;
			switch (itemPosition)
			{
			case 0:
				fragment = new CodeProjectMemberListFragment ();
				currentScreen = Screen.MemberList;
				break;
			case 1:
				fragment = new CodeProjectArticleFeedFragment ();
				currentScreen = Screen.ArticleFeed;
				break;
			case 2:
				fragment = new CodeProjectLoungeFeedFragment ();
				currentScreen = Screen.LoungFeed;
				break;
			}

			this.FragmentManager.BeginTransaction()
				.Replace(Resource.Id.frameLayoutFragmentContainer, fragment).Commit();

			this.InvalidateOptionsMenu ();

			return true;
		}
Пример #2
0
        public bool OnNavigationItemSelected(int itemPosition, long itemId)
        {
            Fragment fragment = null;

            switch (itemPosition)
            {
            case 0:
                fragment      = new CodeProjectMemberListFragment();
                currentScreen = Screen.MemberList;
                break;

            case 1:
                fragment      = new CodeProjectArticleFeedFragment();
                currentScreen = Screen.ArticleFeed;
                break;

            case 2:
                fragment      = new CodeProjectLoungeFeedFragment();
                currentScreen = Screen.LoungFeed;
                break;
            }

            this.FragmentManager.BeginTransaction()
            .Replace(Resource.Id.frameLayoutFragmentContainer, fragment).Commit();

            this.InvalidateOptionsMenu();

            return(true);
        }
Пример #3
0
		protected override void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			SetContentView (Resource.Layout.MainLayout);

			String[] data = new String[]{ "Members", "Articles", "Community" };
			ArrayAdapter list = new ArrayAdapter(this, Android.Resource.Layout.SimpleSpinnerDropDownItem, data);

			ActionBar.SetDisplayShowTitleEnabled (false);
			ActionBar.NavigationMode = ActionBarNavigationMode.List;
			ActionBar.SetListNavigationCallbacks (list, this);

			CodeProjectMemberListFragment codeProjectMemberListFragment = new CodeProjectMemberListFragment();
			this.FragmentManager.BeginTransaction()
				.Add(Resource.Id.frameLayoutFragmentContainer, codeProjectMemberListFragment).Commit();

			currentScreen = Screen.MemberList;
		}
Пример #4
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.MainLayout);

            String[]     data = new String[] { "Members", "Articles", "Community" };
            ArrayAdapter list = new ArrayAdapter(this, Android.Resource.Layout.SimpleSpinnerDropDownItem, data);

            ActionBar.SetDisplayShowTitleEnabled(false);
            ActionBar.NavigationMode = ActionBarNavigationMode.List;
            ActionBar.SetListNavigationCallbacks(list, this);

            CodeProjectMemberListFragment codeProjectMemberListFragment = new CodeProjectMemberListFragment();

            this.FragmentManager.BeginTransaction()
            .Add(Resource.Id.frameLayoutFragmentContainer, codeProjectMemberListFragment).Commit();

            currentScreen = Screen.MemberList;
        }