이제 두 번째 Android 11 개발자 프리뷰를 사용할 수 있습니다. 테스트해 보고 의견을 공유하세요.

ViewModelStoreOwner

public interface ViewModelStoreOwner

androidx.lifecycle.ViewModelStoreOwner


A scope that owns ViewModelStore.

A responsibility of an implementation of this interface is to retain owned ViewModelStore during the configuration changes and call ViewModelStore.clear(), when this scope is going to be destroyed.

Summary

Public methods

abstract ViewModelStore getViewModelStore()

Returns owned ViewModelStore

Public methods

getViewModelStore

public abstract ViewModelStore getViewModelStore ()

Returns owned ViewModelStore

Returns
ViewModelStore a ViewModelStore