public void SetupDrawer()
        {
            _drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_navigation);
            _drawerList   = FindViewById <ListView>(Resource.Id.drawer_list);

            _drawerToggle = new DrawerToggle(this, _drawerLayout, Resource.String.drawer_open,
                                             Resource.String.drawer_close);
            _drawerToggle.DrawerIndicatorEnabled = true;

            if (_drawerLayout != null)
            {
                //_drawerLayout.SetScrimColor(Color.DimGray);
                _drawerLayout.SetDrawerListener(_drawerToggle);
            }

            EnableHomeButton();

            _drawerToggle.SyncState();

            Task.Run
            (
                async() =>
            {
                await AddDrawerItems(await SalesAppHamburger.GetDefaultItems());
            }
            );

            _drawerList.ItemClick += (sender, args) => SelectItem(sender as ListView, args);
        }
Esempio n. 2
0
 public override void OnActivityCreated(Bundle savedInstanceState)
 {
     base.OnActivityCreated(savedInstanceState);
     if (Toolbar != null)
     {
         DrawerToggle?.SyncState();
     }
 }
Esempio n. 3
0
 protected override void OnPostCreate(Bundle savedInstanceState)
 {
     if (savedInstanceState != null)
     {
         lastSyncInMillis = savedInstanceState.GetLong(LastSyncArgument);
         syncStatus       = savedInstanceState.GetInt(LastSyncResultArgument);
         UpdateSyncStatus();
     }
     base.OnPostCreate(savedInstanceState);
     DrawerToggle.SyncState();
 }
Esempio n. 4
0
 protected override void OnPostCreate(Bundle savedInstanceState)
 {
     base.OnPostCreate(savedInstanceState);
     drawerToggle.SyncState();
 }