/// <summary>
        /// Create new instance
        /// </summary>
        /// <returns>The instance.</returns>
        public static LoginFragment NewInstance()
        {
            var fragment = new LoginFragment {
                Arguments = new Bundle()
            };

            return(fragment);
        }
Example #2
0
        /// <summary>
        /// Navigates to logout.
        /// </summary>
        void NavigateToLogout()
        {
            PopToRoot();

            _drawerLayout.CloseDrawers();

            var fragment = LoginFragment.NewInstance();

            ReplaceFragment(fragment, LoginFragment.TAG);
        }
Example #3
0
        /// <summary>
        /// Create event
        /// </summary>
        /// <param name="savedInstanceState">Saved instance state.</param>
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetupAWS();

            AppCenter.Start(AppSecret, typeof(Analytics), typeof(Crashes));

            RegisterServiceLocator();

            UserDialogs.Init(this);
            VersionTracking.Track();

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.main_activity);

            _drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);

            _navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
            _navigationView.NavigationItemSelected += OnNavigationItemSelected;

            // Set the action bar
            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetActionBar(toolbar);

            // initialise login fragment
            var loginFragment = LoginFragment.NewInstance();

            SupportFragmentManager.BeginTransaction()
            .Add(Resource.Id.fragment_container, loginFragment)
            .Commit();

            // Enable periodic sync
            EnablePeriodicSync();

            // Check permissions
            CheckPermissions();
        }