Google is working on letting you resize picture-in-picture windows in Android 11

Google is working on letting you resize picture-in-picture windows in Android 11

Android 8.0 Oreo introduced picture-in-picture mode to Android smartphones. This feature allows you to watch videos in a small, floating window while you’re using other applications. It’s also useful for navigation so you can respond to messages or look something up on the Internet without missing what’s next on your route. As smartphones have become larger and larger, especially with the introduction of foldable devices, picture-in-picture windows have remained the same size. In Android 11, though, Google may be introducing a way for users to resize picture-in-picture windows.

Picture-in-picture (PIP) mode in Android 11. I opened a YouTube video and then performed the home gesture (a tap of the home button also works) to open the video in a PIP window.

OEMs can set the default edge insets (how far from the screen edge the PIP window first appears), the default screen width and height percentages, the default aspect ratio, the default gravity (the corner of the display where the PIP window starts), and the snap behavior (where the PIP window moves after the user lets go). However, most OEMs don’t touch the default values in AOSP, and they usually don’t modify or extend the functionality of PIP windows. Since AOSP doesn’t provide a way for users to resize PIP windows, OEMs don’t, either. That could change with the introduction of a new class called PipResizeGestureHandler in the SystemUI of Android 11 Developer Preview 2.

This new class is responsible for checking for gesture events within a touch region around the left, right, top, or bottom edge of the picture-in-picture window. The user will be able to drag the PIP window to resize it, though the aspect ratio of the window won’t be changed. At the moment, there doesn’t seem to be a limit on how large the PIP window can become through resizing. Resizing a PIP window in this way seems similar to resizing freeform multi-windows, with the exception of the aspect ratio not being enforced for freeform windows.

The PipResizeGestureHandler class is part of com.android.systemui rather than com.google.android.systemui, so this change to picture-in-picture mode functionality should be reflected in AOSP Android 11 as well as Android 11 on the Google Pixel. Since the class is under com.android.systemui.pip.phone and not com.android.systemui.pip.tv, this feature is most likely intended for phones and not Android TV. However, I wasn’t able to activate this new feature on my Pixel 3a XL, so I can’t confirm if it’s working yet. I’ll be exploring the code more in this and subsequent preview releases to see if I can get it working, though.

Android 11 News on XDA

Want more posts like this delivered to your inbox? Enter your email to be subscribed to our newsletter.

READ THIS NEXT