FrontendAndroidViewModel

abstract class FrontendAndroidViewModel<P : AnyPanel>(panel: P, application: Application) : FrontendViewModel<P>

A combination of FrontendViewModel and AndroidViewModel. Should only be used when the Application instance is really required. This should be rare however, as ViewModels should not normally rely on a context. Instead, the layout should resolve raw information from the ViewModel using its own context.

Constructors

Link copied to clipboard
fun <P : AnyPanel> FrontendAndroidViewModel(panel: P, application: Application)

Types

Link copied to clipboard
open class Factory(panel: AnyPanel, application: Application) : ViewModelProvider.Factory

A factory class for constructing class instances that derive from FrontendAndroidViewModel with the given panel and the given application instance.

Inherited properties

Link copied to clipboard
val isSafetyLockEnabled: LiveData<Boolean>

Whether or not safety lock is currently enabled.

Link copied to clipboard
val panel: P

The Panel of type P that hosts this ViewModel.

Inherited functions

Link copied to clipboard
open fun addCloseable(@NonNull p0: Closeable)
Link copied to clipboard
override fun getLifecycle(): Lifecycle