Created
March 8, 2017 09:04
-
-
Save wasnot/ba92c0ee52e647ee1c807a07686cb70e to your computer and use it in GitHub Desktop.
ViewのonStart/onPause ref: http://qiita.com/wasnot/items/06375957a325ba3bc2fa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onVisibilityChanged(@NonNull View changedView, int visibility) { | |
super.onVisibilityChanged(changedView, visibility); | |
switch (visibility){ | |
case VISIBLE://onResume called | |
case INVISIBLE:// onPause() called | |
} | |
} | |
@Override | |
public void onWindowFocusChanged(boolean hasWindowFocus) { | |
super.onWindowFocusChanged(hasWindowFocus); | |
if (hasWindowFocus) //onresume() called | |
else // onPause() called | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment