Documentation
¶
Overview ¶
Transaction lifecycle and chaining pattern example.
Demonstrates:
- Creating and closing a Transaction
- Applying an empty transaction (a valid no-op in SurfaceFlinger)
- The chaining pattern: every setter returns *Transaction so calls compose
A Transaction batches property changes (position, visibility, z-order, etc.) to one or more SurfaceControls and submits them atomically via Apply(). Creating a SurfaceControl requires an ANativeWindow (obtained from an Activity), so this example focuses on the Transaction itself, which can be created standalone.
This program must run on an Android device with API level 29+.
Click to show internal directories.
Click to hide internal directories.