transaction

command
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 3 Imported by: 0

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+.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL