public abstract class AbstractState extends java.lang.Object implements Restorable
StatefulTabSwitcherDecorator
. The state stores the tab it corresponds to and implements the
interface Restorable
to be able to store and restore its state.Constructor and Description |
---|
AbstractState(Tab tab)
Creates a new state of a specific tab.
|
Modifier and Type | Method and Description |
---|---|
Tab |
getTab()
Returns the tab, the state corresponds to.
|
void |
restoreInstanceState(android.os.Bundle savedInstanceState)
Restores a previously saved state.
|
void |
saveInstanceState(android.os.Bundle outState)
Saves the current state.
|
@NonNull public Tab getTab()
Tab
. The tab
may not be nullpublic void saveInstanceState(@NonNull android.os.Bundle outState)
Restorable
saveInstanceState
in interface Restorable
outState
- The bundle, which should be used to store the saved state, as an instance of the
class Bundle
. The bundle may not be nullpublic void restoreInstanceState(@Nullable android.os.Bundle savedInstanceState)
Restorable
restoreInstanceState
in interface Restorable
savedInstanceState
- The saved state as an instance of the class Bundle
or null, if no saved state
is available