Språk

SurfaceViewLifecycle Enum

Definition

Controls when a SurfaceView surface follows its attachment or visibility lifecycle.

public enum SurfaceViewLifecycle
type SurfaceViewLifecycle = 
Inheritance
SurfaceViewLifecycle

Fields

Name Value Description
Default 0

Default lifecycle of the Surface owned by this SurfaceView. The default lifecycle matches FollowsVisibility.

FollowsVisibility 1

The Surface lifecycle is tied to SurfaceView visibility. The Surface is created when the SurfaceView becomes visible, and is destroyed when the SurfaceView is no longer visible.

FollowsAttachment 2

The Surface lifecycle follows SurfaceView attachment rather than visibility. The surface can be created while the SurfaceView is attached, even if it is not visible, and is destroyed when the SurfaceView is detached. A surface format change can also destroy and recreate it while the SurfaceView is attached.

Applies to