RestorableViewController

In package com.nhaarman.acorn.android.presentation

class com.nhaarman.acorn.android.presentation.RestorableViewController

A helper interface that offers default implementations for View state saving and restoration.

Classes that utilize the ViewController interface and implement RestorableContainer need to manually implement saving the hierarchy state. To make this easier, you can implement this interface instead:


interface MyContainer: RestorableContainer

class MyViewController : MyContainer, RestorableViewController

Fields

open context:

A handle to the Context the view is running in.

open resources:

A handle to the Resources associated to the view.

Methods

open fun saveInstanceState(): ContainerState

Save instance state.

Parameters:
  • No parameters
open fun restoreInstanceState(bundle: ContainerState)

Restore given instance state.

Parameters:
open fun getHierarchyState(bundle: ContainerState): ?
Parameters: