activityScope

Lazily creates or retrieves an AndroidScopes.ActivityScope tied to this ComponentActivity. The scope is automatically created and attached to the activity's lifecycle. It will be closed when the activity is destroyed.

Return

A Lazy delegate that provides the AndroidScopes.ActivityScope.

Parameters

pathBuilder

A DSL block to define the path to the parent scope. Defaults to the root scope.


@JvmName(name = "inlineActivityScope")
inline fun <T : Activity> ComponentActivity.activityScope(noinline pathBuilder: ActivityScopePathBuilder.() -> Path = { find of Root }): Lazy<AndroidScopes.ActivityScope>

A type-safe overload of activityScope for inline usage.