protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.NavigationDrawer);

            title = drawerTitle = Title;

            drawer = FindViewById<Android.Support.V4.Widget.DrawerLayout>(Resource.Id.drawer_layout);
            drawerList = FindViewById<ListView>(Resource.Id.left_drawer);

            drawerList.Adapter = new ArrayAdapter<string>(this, Resource.Layout.ItemMenu, Sections);

            drawerList.ItemClick += (sender, args) => ListItemClicked(args.Position);


            drawer.SetDrawerShadow(Resource.Drawable.drawer_shadow_dark, GravityCompat.End); //start



            //DrawerToggle is the animation that happens with the indicator next to the actionbar
            drawerToggle = new MyActionBarDrawerToggle(this, drawer,
                                                      Resource.Drawable.ic_drawer_light,
                                                      Resource.String.drawer_open,
                                                      Resource.String.drawer_close);

            //Display the current fragments title and update the options menu
            drawerToggle.DrawerClosed += (o, args) => 
            {
                SupportActionBar.Title = title;
                SupportInvalidateOptionsMenu();
            };

            //Display the drawer title and update the options menu
            drawerToggle.DrawerOpened += (o, args) => 
            {
                SupportActionBar.Title = drawerTitle;
                SupportInvalidateOptionsMenu();
            };

            //Set the drawer lister to be the toggle.
            drawer.SetDrawerListener(drawerToggle);

            

            //if first time you will want to go ahead and click first item.
            if (savedInstanceState == null)
            {
                ListItemClicked(0);
            }


            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetHomeButtonEnabled(true);
        }
        //NavigationView a;
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            var toolbar = FindViewById<Toolbar>(Resource.Id.toolbar);

            //Toolbar will now take on default actionbar characteristics
            SetSupportActionBar(toolbar);
            SupportActionBar.SetHomeAsUpIndicator(Resource.Drawable.ic_action_nav_menu_holo_dark);
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById<Button>(Resource.Id.MyButton);

            button.Click += delegate {
                Intent getIntent = new Intent(Intent.ActionGetContent);
                getIntent.SetType("image/*");

                Intent chooserIntent = Intent.CreateChooser(getIntent,GetText(Resource.String.PickImage));

                StartActivityForResult(chooserIntent, 0);
            };
            drawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
            var navigationView = FindViewById<NavigationView>(Resource.Id.nav_view);
            navigationView.NavigationItemSelected += (sender, e) => {
                e.MenuItem.SetChecked(true);
                //react to click here and swap fragments or navigate
                drawerLayout.CloseDrawers();
                if (e.MenuItem.ItemId == Resource.Id.nav_encrypt)
                {
                    var intent = new Intent(this, typeof(EncryptActivity));
                    intent.AddFlags(ActivityFlags.ClearTask);
                    intent.AddFlags(ActivityFlags.NewTask);
                    StartActivity(intent);
                }
            };
        }
        public void setUp(int fragmentId, Android.Support.V4.Widget.DrawerLayout drawerLayout)
        {
            mFragmentContainerView = this.Activity.FindViewById<ListView>(fragmentId);
            mDrawerLayout = drawerLayout;
            mDrawerLayout.SetDrawerShadow(Resource.Drawable.drawer_shadow, (int)GravityFlags.Start);

            var actionBar = Activity.ActionBar; //ActionBar actionBar = getActionBar();
            actionBar.SetDisplayHomeAsUpEnabled(true);
            actionBar.SetHomeButtonEnabled(true);

            mDrawerToggle = new CustomActionBarDrawerToggle(
                this.Activity,                    /* host Activity */
                mDrawerLayout,                    /* DrawerLayout object */
                Resource.Drawable.ic_drawer,             /* nav drawer image to replace 'Up' caret */
                Resource.String.navigation_drawer_open,  /* "open drawer" description for accessibility */
                Resource.String.navigation_drawer_close  /* "close drawer" description for accessibility */
            );

            mDrawerToggle.DrawerClosed += delegate
            {
                if (! IsAdded) {
                    return;
                }
                Activity.InvalidateOptionsMenu();
            };

            mDrawerToggle.DrawerOpened += delegate
            {
                if (! IsAdded) {
                    return;
                }
                if (!mUserLearnedDrawer) {
                    mUserLearnedDrawer = true;
                    ISharedPreferences sp = Android.Preferences.PreferenceManager.GetDefaultSharedPreferences(Application.Context);
                    ISharedPreferencesEditor editor = sp.Edit();
                    editor.PutBoolean(PREF_USER_LEARNED_DRAWER, true).Apply();
                }
                Activity.InvalidateOptionsMenu();
            };

            if (!mUserLearnedDrawer && !mFromSavedInstanceState) {
                mDrawerLayout.OpenDrawer(mFragmentContainerView);
            }

            mDrawerLayout.Post(() =>
            {
                mDrawerToggle.SyncState();
            });

            mDrawerLayout.SetDrawerListener(mDrawerToggle);
        }