Beispiel #1
0
 private void RemoveToolbarInstance()
 {
     if (_toolbar == null)
     {
         return;
     }
     _toolbar.SetNavigationOnClickListener(null);
     _toolbar = null;
 }
 public MainScreenView(ViewGroup root) : base(Resource.Layout.MainScreen, root)
 {
     Toolbar = FindViewById <AndroidX.AppCompat.Widget.Toolbar>(Resource.Id.Toolbar);
     Toolbar.MenuItemClick += Toolbar_MenuItemClick;
     Toolbar.SetNavigationIcon(Resource.Drawable.ic_menu_white_24dp);
     Toolbar.SetNavigationOnClickListener(this);
     _syncProgressBar = FindViewById <ProgressBar>(Resource.Id.SyncProgressBar);
     _popupsPresenter = FindViewById <PopupsPresenter>(Resource.Id.MainScreenPopupsPresenter);
     _buttonIsOffline = FindViewById <Button>(Resource.Id.ButtonIsOffline);
     _buttonSyncError = FindViewById <Button>(Resource.Id.ButtonSyncError);
 }
Beispiel #3
0
 private void GetToolbarInstance()
 {
     try
     {
         _toolbar = (AToolbar)ToolbarFieldInfo.GetValue(this);
         _toolbar.SetNavigationOnClickListener(this);
     }
     catch (Exception exception)
     {
         System.Diagnostics.Debug.WriteLine($"Can't get toolbar with error: {exception.Message}");
     }
 }