Ejemplo n.º 1
0
        protected override void OnResume()
        {
            Profile.FrameBegin();

            // counterpart to OnPause
            base.OnResume();

            if (_application != null && CurrentFocus != null && _application.OnThisPlatform().GetShouldPreserveKeyboardOnResume())
            {
                CurrentFocus.ShowKeyboard();
            }

            _previousState = _currentState;
            _currentState  = AndroidApplicationLifecycleState.OnResume;

            if (!_powerSaveReceiverRegistered && Forms.IsLollipopOrNewer)
            {
                // Start listening for power save mode changes
                RegisterReceiver(_powerSaveModeBroadcastReceiver, new IntentFilter(
                                     PowerManager.ActionPowerSaveModeChanged
                                     ));

                _powerSaveReceiverRegistered = true;
            }

            OnStateChanged();

            Profile.FrameEnd();
        }
Ejemplo n.º 2
0
        protected override void OnResume()
        {
            Profile.FrameBegin();

            // counterpart to OnPause
            base.OnResume();

            if (_application != null && CurrentFocus != null && _application.OnThisPlatform().GetShouldPreserveKeyboardOnResume())
            {
                CurrentFocus.ShowKeyboard();
            }

            _previousState = _currentState;
            _currentState  = AndroidApplicationLifecycleState.OnResume;

            if (_needMainPageAssign)
            {
                _needMainPageAssign = false;
                SettingMainPage();
                SetMainPage();
            }

            OnStateChanged();

            Profile.FrameEnd();
        }
Ejemplo n.º 3
0
        protected override void OnResume()
        {
            // counterpart to OnPause
            base.OnResume();

            if (_application != null && _application.OnThisPlatform().GetShouldPreserveKeyboardOnResume())
            {
                if (CurrentFocus != null && (CurrentFocus is EditText || CurrentFocus is TextView || CurrentFocus is SearchView))
                {
                    CurrentFocus.ShowKeyboard();
                }
            }

            _previousState = _currentState;
            _currentState  = AndroidApplicationLifecycleState.OnResume;

            if (Forms.IsLollipopOrNewer)
            {
                // Start listening for power save mode changes
                RegisterReceiver(_powerSaveModeBroadcastReceiver, new IntentFilter(
                                     PowerManager.ActionPowerSaveModeChanged
                                     ));
            }

            OnStateChanged();
        }
        protected override void OnResume()
        {
            // counterpart to OnPause
            base.OnResume();

            if (_application != null && _application.OnThisPlatform().GetShouldPreserveKeyboardOnResume())
            {
                if (CurrentFocus != null && (CurrentFocus is EditText || CurrentFocus is TextView || CurrentFocus is SearchView))
                {
                    CurrentFocus.ShowKeyboard();
                }
            }

            _previousState = _currentState;
            _currentState  = AndroidApplicationLifecycleState.OnResume;

            OnStateChanged();
        }