In the case of the aspect ratio, this is defined using the width and height dimensions of a VideoView instance: The following code, for example, configures aspect ratio and action parameters within a PictureInPictureParams object.
setAspectRatio() – Declares the preferred aspect ratio for appearance of the PiP window.
![rational application developer screenshot 2018 rational application developer screenshot 2018](https://d20ohkaloyme4g.cloudfront.net/img/document_thumbnails/39d4d81a8d1e3e187239cb3223003232/thumb_1200_1698.png)
#Rational application developer screenshot 2018 android
The android:supportsPictureInPicture entry enables PiP for the activity while the android:configChanges property notifies Android that the activity is able to handle layout configuration changes.
![rational application developer screenshot 2018 rational application developer screenshot 2018](https://www.ibm.com/support/pages/system/files/support/swg/swgdocs.nsf/0/3dbc011da9108c0b85257f9b0064c9b8/Content/36.3378.gif)
PiP mode is configured on a per activity basis by adding the following lines to each activity element for which PiP support is required: The second step in implementing PiP mode is to enable it within the project’s manifest file. To modify the SDK setting, locate the Gradle Scripts –> adle (Module: app) file and increase the minSdkVersion setting from 14 to 26: PiP mode is currently only supported on devices running Android 8.0 (API 26) or newer.