Ejemplo n.º 1
0
 public override void OnBackPressed()
 {
     //base.OnBackPressed();
     if (CurrentFragmentTag.Equals(DashboardSummaryFragment.TAG))
     {
         if (exitCounter == 0)
         {
             exitCounter++;
             Toast.MakeText(this, "Press again to exit app", ToastLength.Short).Show();
         }
         else
         {
             exitCounter = 0;
             base.OnBackPressed();
         }
     }
     else if (CurrentFragmentTag.Equals(EmployeeCollectionFragment.TAG))
     {
         ShowDashBoardSummaryFragment();
     }
     else if (CurrentFragmentTag.Equals(UserProfileFragment.TAG))
     {
         EmployeeCollectionFragment employeeCollectionFragment = new EmployeeCollectionFragment();
         ShowFragment(employeeCollectionFragment);
     }
 }
Ejemplo n.º 2
0
        public void ShowEmployeeCollectionView(FilterLookup filter)
        {
            EmployeeCollectionFragment employeeCollectionViewFragment = new EmployeeCollectionFragment();

            employeeCollectionViewFragment.filter = filter;
            FragmentTransaction transaction = FragmentManager.BeginTransaction();

            transaction.Replace(Resource.Id.fragmentContainerID, employeeCollectionViewFragment);
            transaction.Commit();
        }