LifecycleOwnerDelegate

actual class LifecycleOwnerDelegate : LifecycleOwner, ViewModelStoreOwner, SavedStateRegistryOwner, HasDefaultViewModelProviderFactory
expect class LifecycleOwnerDelegate : LifecycleOwner, ViewModelStoreOwner, SavedStateRegistryOwner, HasDefaultViewModelProviderFactory
actual class LifecycleOwnerDelegate : LifecycleOwner, ViewModelStoreOwner, SavedStateRegistryOwner, HasDefaultViewModelProviderFactory
actual class LifecycleOwnerDelegate : LifecycleOwner, ViewModelStoreOwner, SavedStateRegistryOwner, HasDefaultViewModelProviderFactory
actual class LifecycleOwnerDelegate : LifecycleOwner, ViewModelStoreOwner, SavedStateRegistryOwner, HasDefaultViewModelProviderFactory

Constructors

Link copied to clipboard
expect constructor(delegate: LifecycleOwnerDelegate, arguments: Bundle?)
actual constructor(delegate: LifecycleOwnerDelegate, arguments: Bundle?)
actual constructor(delegate: LifecycleOwnerDelegate, arguments: Bundle?)
actual constructor(delegate: LifecycleOwnerDelegate, arguments: Bundle?)

Types

Companion
Link copied to clipboard
object Companion
object Companion
object Companion
object Companion

Properties

Link copied to clipboard
actual val arguments: Bundle?
expect val arguments: Bundle?
actual val arguments: Bundle?
actual val arguments: Bundle?
actual val arguments: Bundle?
Link copied to clipboard
actual open override val defaultViewModelCreationExtras: CreationExtras
expect open override val defaultViewModelCreationExtras: CreationExtras
actual open override val defaultViewModelCreationExtras: CreationExtras
actual open override val defaultViewModelCreationExtras: CreationExtras
actual open override val defaultViewModelCreationExtras: CreationExtras
Link copied to clipboard
actual open override val defaultViewModelProviderFactory: ViewModelProvider.Factory
expect open override val defaultViewModelProviderFactory: ViewModelProvider.Factory
actual open override val defaultViewModelProviderFactory: ViewModelProvider.Factory
actual open override val defaultViewModelProviderFactory: ViewModelProvider.Factory
actual open override val defaultViewModelProviderFactory: ViewModelProvider.Factory
Link copied to clipboard
actual val id: String
expect val id: String
actual val id: String
actual val id: String
actual val id: String
Link copied to clipboard
actual open override val lifecycle: Lifecycle
expect open override val lifecycle: Lifecycle
actual open override val lifecycle: Lifecycle
actual open override val lifecycle: Lifecycle
actual open override val lifecycle: Lifecycle
Link copied to clipboard
@get:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@set:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual var maxLifecycle: Lifecycle.State
@get:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@set:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
expect var maxLifecycle: Lifecycle.State
@get:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@set:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual var maxLifecycle: Lifecycle.State
@get:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@set:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual var maxLifecycle: Lifecycle.State
@get:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
@set:RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual var maxLifecycle: Lifecycle.State
Link copied to clipboard
@get:MainThread
actual val savedStateHandle: SavedStateHandle
expect val savedStateHandle: SavedStateHandle
@get:MainThread
actual val savedStateHandle: SavedStateHandle
@get:MainThread
actual val savedStateHandle: SavedStateHandle
@get:MainThread
actual val savedStateHandle: SavedStateHandle
Link copied to clipboard
actual open override val savedStateRegistry: SavedStateRegistry
expect open override val savedStateRegistry: SavedStateRegistry
actual open override val savedStateRegistry: SavedStateRegistry
actual open override val savedStateRegistry: SavedStateRegistry
actual open override val savedStateRegistry: SavedStateRegistry
Link copied to clipboard
actual open override val viewModelStore: ViewModelStore
expect open override val viewModelStore: ViewModelStore
actual open override val viewModelStore: ViewModelStore
actual open override val viewModelStore: ViewModelStore
actual open override val viewModelStore: ViewModelStore

Functions

Link copied to clipboard
@Composable
fun <VM : ViewModel> ViewModelStoreOwner.createVM(modelClass: KClass<VM>, key: String?, extras: CreationExtras): VM

用于构造简单的ViewModel的工厂

Link copied to clipboard
actual fun handleLifecycleEvent(event: Lifecycle.Event)
expect fun handleLifecycleEvent(event: Lifecycle.Event)
actual fun handleLifecycleEvent(event: Lifecycle.Event)
actual fun handleLifecycleEvent(event: Lifecycle.Event)
actual fun handleLifecycleEvent(event: Lifecycle.Event)
Link copied to clipboard
@Composable
actual fun LifecycleOwnerDelegate.LocalOwnersProvider(saveableStateHolder: SaveableStateHolder, pageScope: PageScope, content: () -> Unit)
@Composable
expect fun LifecycleOwnerDelegate.LocalOwnersProvider(saveableStateHolder: SaveableStateHolder, pageScope: PageScope, content: @Composable () -> Unit)
@Composable
actual fun LifecycleOwnerDelegate.LocalOwnersProvider(saveableStateHolder: SaveableStateHolder, pageScope: PageScope, content: () -> Unit)
@Composable
actual fun LifecycleOwnerDelegate.LocalOwnersProvider(saveableStateHolder: SaveableStateHolder, pageScope: PageScope, content: () -> Unit)
@Composable
actual fun LifecycleOwnerDelegate.LocalOwnersProvider(saveableStateHolder: SaveableStateHolder, pageScope: PageScope, content: () -> Unit)
Link copied to clipboard
suspend fun LifecycleOwner.repeatOnLifecycle(state: Lifecycle.State, block: suspend CoroutineScope.() -> Unit)
Link copied to clipboard
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual fun updateState()
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
expect fun updateState()

Update the state to be the lower of the two constraints:

@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual fun updateState()
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual fun updateState()
@RestrictTo(value = [RestrictTo.Scope.LIBRARY_GROUP])
actual fun updateState()