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); }
public override void OnActivityCreated(Bundle savedInstanceState) { base.OnActivityCreated(savedInstanceState); if (Toolbar != null) { DrawerToggle?.SyncState(); } }
protected override void OnPostCreate(Bundle savedInstanceState) { if (savedInstanceState != null) { lastSyncInMillis = savedInstanceState.GetLong(LastSyncArgument); syncStatus = savedInstanceState.GetInt(LastSyncResultArgument); UpdateSyncStatus(); } base.OnPostCreate(savedInstanceState); DrawerToggle.SyncState(); }
protected override void OnPostCreate(Bundle savedInstanceState) { base.OnPostCreate(savedInstanceState); drawerToggle.SyncState(); }