1

显示警告的 AndroidStudio 屏幕截图:

在此处输入图像描述

然而我在这里发现的是:

Android 8.0 (API level 26) allows activities to launch in picture-in-picture (PIP) mode.
PIP is a special type of multi-window mode mostly used for video playback. It lets the
user watch a video in a small window pinned to a corner of the screen while navigating
between apps or browsing content on the main screen.

我无法找到现在已弃用的地方。我错过了什么还是 AS 有错误?我想确保我没有在死路上编码。

4

1 回答 1

1

enterPictureInPictureMode()在 API 24 中引入并在 API 26 中弃用。它已被 取代enterPictureInPictureMode(PictureInPictureParams),在 API 26 中引入。

此处的文档:https://developer.android.com/reference/android/app/Activity#enterPictureInPictureMode(android.app.PictureInPictureParams)

于 2020-09-03T15:53:13.917 回答