/// <summary>
        /// Changes the sidebar view of the app. Used when a user clicks on a menu item or to
        /// manually change the view
        /// </summary>
        /// <param name="id"> the id of the fragment that should be displayed</param>
        private bool ChangeNavigationView(int id)
        {
            Microsoft.Intune.Mam.Client.Support.V4.App.MAMFragment frag = null;

            switch (id)
            {
            case Resource.Id.nav_tasks:
                frag = new TasksFragment();
                break;

            case Resource.Id.nav_about:
                frag = new AboutFragment();
                break;

            case Resource.Id.nav_sign_out:
                AuthManager.GetManager().SignOut(this);
                break;

            default:     // If we don't recognize the id, go to the default (submit) rather than crashing
            case Resource.Id.nav_submit:
                frag = new SubmitFragment();
                break;
            }

            bool didChangeView = frag != null;

            if (didChangeView)
            {
                try
                {
                    // Display the fragment
                    Android.Support.V4.App.FragmentManager fragManager = SupportFragmentManager;
                    fragManager.BeginTransaction().Replace(Resource.Id.flContent, frag).Commit();
                }
                catch (NullReferenceException e)
                {
                    Console.WriteLine(e.StackTrace);
                    didChangeView = false;
                }
            }

            DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            if (drawer != null)
            {
                drawer.CloseDrawer(Android.Support.V4.View.GravityCompat.Start);
            }
            return(didChangeView);
        }
Ejemplo n.º 2
0
 public _OnItemLongClickListener_608(TasksFragment _enclosing)
 {
     this._enclosing = _enclosing;
 }
Ejemplo n.º 3
0
 public _OnClickListener_560(TasksFragment _enclosing)
 {
     this._enclosing = _enclosing;
 }
Ejemplo n.º 4
0
 public _OnKeyListener_568(TasksFragment _enclosing, EditText text, string listId)
 {
     this._enclosing = _enclosing;
     this.text       = text;
     this.listId     = listId;
 }
Ejemplo n.º 5
0
 public TaskAdapter(TasksFragment _enclosing, Context context, LiveQuery query) :
     base(context, query)
 {
     this._enclosing = _enclosing;
 }