PIP is a special type of multi-window mode mainly used for activities that need to be active on screen but should not take up the whole screen space like watching videos, video calls, navigation, etc. It lets the user watch a video in a small window pinned to a corner of the screen (by default bottom right) while navigating between apps or browsing content on the main screen. Android 8.0 (API level 26) and above allows activities to launch in PIP mode. The PIP window appears in the top-most layer of the screen. You can drag the PIP window to another location using some special toggles. When you tap on the window two special controls appear: a full-screen toggle (in the center of the window) and a close button (an “X” in the upper right corner). Let's get to know how can we implement Picture in Picture (PIP) in Android.
Related Article: https://www.geeksforgeeks.org/how-to-implement-picture-in-picture-pip-in-android/