Beispiel #1
0
 protected virtual void OnNavigationItemClick()
 {
     if (CommonPresenter?.CanPop() ?? false)
     {
         OnBackPressed();
     }
     else
     {
         OpenDrawer(GravityFlags.Start);
     }
 }
Beispiel #2
0
        protected void InitDrawer(int drawerLayoutId, int openDescStrinId, int closeDescStrinId)
        {
            var drawerLayout = FindViewById <DrawerLayout>(drawerLayoutId);
            var drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, openDescStrinId, closeDescStrinId);

            drawerLayout.AddDrawerListener(drawerToggle);

            _drawer = drawerLayout;
            _toggle = drawerToggle;

            if (CommonPresenter?.CanPop() ?? false)
            {
                _toggle.DrawerIndicatorEnabled = false;
            }

            _toggle.SyncState();
        }
Beispiel #3
0
        protected void InitDrawer(int drawerLayoutId, Android.Support.V7.Widget.Toolbar toolbar, int openDescStrinId, int closeDescStrinId)
        {
            var drawerLayout = FindViewById <DrawerLayout>(drawerLayoutId);
            var drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, openDescStrinId, closeDescStrinId)
            {
                ToolbarNavigationClickListener = this
            };

            drawerLayout.AddDrawerListener(drawerToggle);

            drawerToggle.SyncState();

            _drawer = drawerLayout;
            _toggle = drawerToggle;

            if (CommonPresenter?.CanPop() ?? false)
            {
                _toggle.DrawerIndicatorEnabled = false;
            }
        }