Пример #1
0
        void NavigationView_NavigationItemSelected(object sender, NavigationView.NavigationItemSelectedEventArgs e)
        {
            switch (e.MenuItem.ItemId)
            {
                case (Resource.Id.nav_search): // Search
                    var SearchFragment = new SearchFragment();
                    var fragmentSearch = FragmentManager.BeginTransaction();
                    fragmentSearch.Replace(Resource.Id.fragment_container, SearchFragment);
                    fragmentSearch.AddToBackStack(null);
                    fragmentSearch.Commit();

                    this.Title = "TSPMD";

                    break;
                case (Resource.Id.nav_files): // Files
                    var FilesFragment = new FilesFragment();
                    var fragmentFiles = FragmentManager.BeginTransaction();
                    fragmentFiles.Replace(Resource.Id.fragment_container, FilesFragment);
                    fragmentFiles.AddToBackStack(null);
                    fragmentFiles.Commit();

                    this.Title = "TSPMD";

                    break;
                case (Resource.Id.nav_settings): // Settings
                    var SettingsFramgment = new SettingsFragment();
                    var fragmentSettings = FragmentManager.BeginTransaction();
                    fragmentSettings.Replace(Resource.Id.fragment_container, SettingsFramgment);
                    fragmentSettings.AddToBackStack(null);
                    fragmentSettings.Commit();

                    this.Title = "TSPMD";

                    break;
                case (Resource.Id.nav_about): // About
                    var AboutFragment = new AboutFragment();
                    var fragmentAbout = FragmentManager.BeginTransaction();
                    fragmentAbout.Replace(Resource.Id.fragment_container, AboutFragment);
                    fragmentAbout.AddToBackStack(null);
                    fragmentAbout.Commit();

                    this.Title = "TSPMD";

                    break;
            }

            // Close drawer
            drawerLayout.CloseDrawers();
        }
Пример #2
0
 public FilesListViewAdapter(Context context, List <ListViewItem> items, FilesFragment filesActivity)
 {
     items_         = items;
     context_       = context;
     filesActivity_ = filesActivity;
 }