protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.main_layout); is_dual_pane = Resources.GetBoolean(Resource.Boolean.has_two_panes); var fm = SupportFragmentManager; var transaction = fm.BeginTransaction(); nav = new NavFragment(); if (is_dual_pane) { grid_fragment = new GridFragment(); current_nav_position = 0; transaction.Replace(Resource.Id.nav_fragment_container, nav); transaction.Replace(Resource.Id.content_fragment_container, grid_fragment); } else { transaction.Replace(Resource.Id.fragment_container, nav); } transaction.Commit(); nav.NavigationItemActivated += nav_NavigationItemSelected; // start our master service // We could alternatively start this from our Application class var intent = new Intent(this, typeof(MasterService)); StartService(intent); }
public GetCourseSpecifictData(NavFragment activity, ListView courselist, ProgressBar pgb, TextView label, CardView holder) { this.activity = activity; this.courselist = courselist; this.pgb = pgb; this.label = label; this.holder = holder; }
public static Fragment NewInstance(int position) { Fragment fragment = new NavFragment(); Bundle args = new Bundle(); args.PutInt(NavFragment.ARG_POSITION, position); fragment.Arguments = args; return(fragment); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.main_layout); var fm = SupportFragmentManager; var transaction = fm.BeginTransaction(); nav = new NavFragment(); transaction.Replace(Resource.Id.fragment_container, nav); transaction.Commit(); nav.NavigationItemActivated += nav_NavigationItemSelected; }
private void SelectItem(int position) { // update the main content by replacing fragments var fragment = NavFragment.NewInstance(position); var fragmentManager = this.FragmentManager; var ft = fragmentManager.BeginTransaction(); ft.Replace(Resource.Id.content_frame, fragment); ft.Commit(); // update selected item title, then close the drawer drawerLayout.CloseDrawers(); }
public GetLectureSpecifictDataHome(NavFragment activity) { this.activity = activity; }
public GetProfileSpecifictData(NavFragment activity) { this.activity = activity; }