Java Code Examples for android.view.View#SCREEN_STATE_OFF

The following examples show how to use android.view.View#SCREEN_STATE_OFF . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
Source Project: RxTools-master   File: SpinKitView.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onScreenStateChanged(int screenState) {
    super.onScreenStateChanged(screenState);
    if (screenState == View.SCREEN_STATE_OFF) {
        if (mSprite != null) {
            mSprite.stop();
        }
    }
}
 
Example 2
Source Project: PinView   File: PinView.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public void onScreenStateChanged(int screenState) {
    super.onScreenStateChanged(screenState);
    switch (screenState) {
        case View.SCREEN_STATE_ON:
            resumeBlink();
            break;
        case View.SCREEN_STATE_OFF:
            suspendBlink();
            break;
    }
}
 
Example 3
Source Project: android-otpview-pinview   File: OtpView.java    License: MIT License 5 votes vote down vote up
@Override
public void onScreenStateChanged(int screenState) {
  super.onScreenStateChanged(screenState);
  if (screenState == View.SCREEN_STATE_ON) {
    resumeBlink();
  } else if (screenState == View.SCREEN_STATE_OFF) {
    suspendBlink();
  }
}
 
Example 4
@Override
public void onScreenStateChanged(int screenState) {
    super.onScreenStateChanged(screenState);
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        mVisible = screenState == View.SCREEN_STATE_ON;
    } else {
        mVisible = screenState == 1;
    }
    if (screenState == View.SCREEN_STATE_OFF) {
        pause();
    } else {
        carryOn();
    }
}