Changes

A Kotlin Android Picture-in-Picture Tutorial

214 bytes added, 17:56, 29 November 2017
no edit summary
Following on from the previous chapters, this chapter will take the existing VideoPlayer project and enhance it to add Picture-in-Picture support, including detecting PiP mode changes and the addition of a PiP action designed to display information about the currently running video.
== Changing Changing the Minimum SDK Setting ==
Picture-in-Picture support is only available on Android 8 API 26 or later. When the VideoPlayer project was originally created, it was configured with a minimum SDK of Android 4.0 API 14 which will prevent the PiP code added in this chapter from compiling. To modify the SDK setting, locate the Gradle Scripts –> build.gradle (Module: app) file and increase the minSdkVersion setting from 14 to 26:
[[File:as3.0_videoplayer_pip_button.png]]

[[File:as3.0_videoplayer_pip_titlebar.png]]

[[File:as3.0_videoplayer_pip_noactionbar.png]]
[[FIle:as3.0_videoplayer_pip_action_icon.png]]
[[File:as3.0_videoplayer_pip_action_button.png]]

[[File:as3.0_videoplayer_pip_action_toast.png]]