語言

SurfaceViewLifecycle 列舉

定義

控制 SurfaceView 表面何時遵循其附加或可見性生命週期。

public enum SurfaceViewLifecycle
type SurfaceViewLifecycle = 
繼承
SurfaceViewLifecycle

欄位

名稱 值 Description
Default 0

這是這個 SurfaceView 所擁有的 Surface 的預設生命週期。 預設生命週期與 相符 FollowsVisibility。

FollowsVisibility 1

Surface 生命週期與 SurfaceView 的可見性相關。 當 SurfaceView 變得可見時,Surface 會被建立,當 SurfaceView 不再可見時,該 Surface 就會被銷毀。

FollowsAttachment 2

Surface 生命週期與 SurfaceView 附件綁定。 當 SurfaceView 首次連接時會建立 Surface,但直到該 SurfaceView 從當前視窗分離後才會被銷毀。

適用於