PictureInPictureParams.Builder
public
static
class
PictureInPictureParams.Builder
extends Object
| java.lang.Object | |
| ↳ | android.app.PictureInPictureParams.Builder |
Builder class for PictureInPictureParams objects.
Summary
Public constructors | |
|---|---|
PictureInPictureParams.Builder()
|
|
Public methods | |
|---|---|
PictureInPictureParams
|
build()
|
PictureInPictureParams.Builder
|
setActions(List<RemoteAction> actions)
Sets the user actions. |
PictureInPictureParams.Builder
|
setAspectRatio(Rational aspectRatio)
Sets the aspect ratio. |
PictureInPictureParams.Builder
|
setSourceRectHint(Rect launchBounds)
Sets the source bounds hint. |
Inherited methods | |
|---|---|
java.lang.Object
| |
Public constructors
Public methods
build
PictureInPictureParams build ()
| Returns | |
|---|---|
PictureInPictureParams |
an immutable PictureInPictureParams to be used when entering or updating
the activity in picture-in-picture. |
setActions
PictureInPictureParams.Builder setActions (List<RemoteAction> actions)
Sets the user actions. If there are more than
getMaxNumPictureInPictureActions() actions, then the input list
will be truncated to that number.
| Parameters | |
|---|---|
actions |
List: the new actions to show in the picture-in-picture menu. |
| Returns | |
|---|---|
PictureInPictureParams.Builder |
this builder instance. |
See also:
setAspectRatio
PictureInPictureParams.Builder setAspectRatio (Rational aspectRatio)
Sets the aspect ratio. This aspect ratio is defined as the desired width / height, and does not change upon device rotation.
| Parameters | |
|---|---|
aspectRatio |
Rational: the new aspect ratio for the activity in picture-in-picture, must be
between 2.39:1 and 1:2.39 (inclusive). |
| Returns | |
|---|---|
PictureInPictureParams.Builder |
this builder instance. |
setSourceRectHint
PictureInPictureParams.Builder setSourceRectHint (Rect launchBounds)
Sets the source bounds hint. These bounds are only used when an activity first enters picture-in-picture, and describe the bounds in window coordinates of activity entering picture-in-picture that will be visible following the transition. For the best effect, these bounds should also match the aspect ratio in the arguments.
| Parameters | |
|---|---|
launchBounds |
Rect: window-coordinate bounds indicating the area of the activity that
will still be visible following the transition into picture-in-picture (eg. the video
view bounds in a video player) |
| Returns | |
|---|---|
PictureInPictureParams.Builder |
this builder instance. |
Interfaces
- ActionBar.OnMenuVisibilityListener
- ActionBar.OnNavigationListener
- ActionBar.TabListener
- AlarmManager.OnAlarmListener
- Application.ActivityLifecycleCallbacks
- Application.OnProvideAssistDataListener
- AppOpsManager.OnOpChangedListener
- DatePickerDialog.OnDateSetListener
- FragmentBreadCrumbs.OnBreadCrumbClickListener
- FragmentManager.BackStackEntry
- FragmentManager.OnBackStackChangedListener
- KeyguardManager.OnKeyguardExitResult
- LoaderManager.LoaderCallbacks
- Notification.Action.Extender
- Notification.Extender
- PendingIntent.OnFinished
- SearchManager.OnCancelListener
- SearchManager.OnDismissListener
- SharedElementCallback.OnSharedElementsReadyListener
- TimePickerDialog.OnTimeSetListener
- UiAutomation.AccessibilityEventFilter
- UiAutomation.OnAccessibilityEventListener
Classes
- ActionBar
- ActionBar.LayoutParams
- ActionBar.Tab
- Activity
- ActivityGroup
- ActivityManager
- ActivityManager.AppTask
- ActivityManager.MemoryInfo
- ActivityManager.ProcessErrorStateInfo
- ActivityManager.RecentTaskInfo
- ActivityManager.RunningAppProcessInfo
- ActivityManager.RunningServiceInfo
- ActivityManager.RunningTaskInfo
- ActivityManager.TaskDescription
- ActivityOptions
- AlarmManager
- AlarmManager.AlarmClockInfo
- AlertDialog
- AlertDialog.Builder
- AliasActivity
- Application
- ApplicationErrorReport
- ApplicationErrorReport.AnrInfo
- ApplicationErrorReport.BatteryInfo
- ApplicationErrorReport.CrashInfo
- ApplicationErrorReport.RunningServiceInfo
- AppOpsManager
- AutomaticZenRule
- DatePickerDialog
- Dialog
- DialogFragment
- DownloadManager
- DownloadManager.Query
- DownloadManager.Request
- ExpandableListActivity
- Fragment
- Fragment.SavedState
- FragmentBreadCrumbs
- FragmentContainer
- FragmentController
- FragmentHostCallback
- FragmentManager
- FragmentManager.FragmentLifecycleCallbacks
- FragmentManagerNonConfig
- FragmentTransaction
- Instrumentation
- Instrumentation.ActivityMonitor
- Instrumentation.ActivityResult
- IntentService
- KeyguardManager
- KeyguardManager.KeyguardDismissCallback
- KeyguardManager.KeyguardLock
- LauncherActivity
- LauncherActivity.IconResizer
- LauncherActivity.ListItem
- ListActivity
- ListFragment
- LoaderManager
- LocalActivityManager
- MediaRouteActionProvider
- MediaRouteButton
- NativeActivity
- Notification
- Notification.Action
- Notification.Action.Builder
- Notification.Action.WearableExtender
- Notification.BigPictureStyle
- Notification.BigTextStyle
- Notification.Builder
- Notification.CarExtender
- Notification.CarExtender.Builder
- Notification.CarExtender.UnreadConversation
- Notification.DecoratedCustomViewStyle
- Notification.DecoratedMediaCustomViewStyle
- Notification.InboxStyle
- Notification.MediaStyle
- Notification.MessagingStyle
- Notification.MessagingStyle.Message
- Notification.Style
- Notification.WearableExtender
- NotificationChannel
- NotificationChannelGroup
- NotificationManager
- NotificationManager.Policy
- PendingIntent
- PictureInPictureParams
- PictureInPictureParams.Builder
- Presentation
- ProgressDialog
- RemoteAction
- RemoteInput
- RemoteInput.Builder
- SearchableInfo
- SearchManager
- Service
- SharedElementCallback
- TabActivity
- TaskStackBuilder
- TimePickerDialog
- UiAutomation
- UiModeManager
- VoiceInteractor
- VoiceInteractor.AbortVoiceRequest
- VoiceInteractor.CommandRequest
- VoiceInteractor.CompleteVoiceRequest
- VoiceInteractor.ConfirmationRequest
- VoiceInteractor.PickOptionRequest
- VoiceInteractor.PickOptionRequest.Option
- VoiceInteractor.Prompt
- VoiceInteractor.Request
- WallpaperInfo
- WallpaperManager
Exceptions