Skip to content

Instantly share code, notes, and snippets.

@tfaki
Created October 14, 2022 07:05
Show Gist options
  • Save tfaki/cea54f2dd292720fb3cf322a25a64d5a to your computer and use it in GitHub Desktop.
Save tfaki/cea54f2dd292720fb3cf322a25a64d5a to your computer and use it in GitHub Desktop.
override fun onPictureInPictureModeChanged(
isInPictureInPictureMode: Boolean,
newConfig: Configuration?
) {
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
if (isInPictureInPictureMode){
Log.d(TAG, "onPictureInPictureModeChanged: Entered PIP")
pipButton.visibility = View.GONE
}
else{
Log.d(TAG, "onPictureInPictureModeChanged: Exited PIP")
pipButton.visibility = View.VISIBLE
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment