public class ViewState
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
boolean |
canCommitFragment() |
LifecycleState |
getLifecycleState()
Gets the current
LifecycleState of this ViewState . |
<T extends View> |
getView() |
boolean |
isCreated()
Tests if the
LifecycleState is created. |
boolean |
isDestroyed()
Tests if the
LifecycleState is destroyed. |
boolean |
isDormant()
Tests if the
LifecycleState is dormant. |
boolean |
isMovedToBackground() |
boolean |
isPaused()
Tests if the
LifecycleState is paused. |
boolean |
isRestarted()
Tests if the
LifecycleState is isRestarted. |
boolean |
isResumed()
Tests if the
LifecycleState is resumed. |
boolean |
isStarted()
Tests if the
LifecycleState is started or resumed. |
boolean |
isStopped()
Tests if the
LifecycleState is stopped. |
void |
onCreate()
Invoked when the
View is created. |
void |
onDestroy()
Invoked when the
View is destroyed. |
void |
onPause()
Invoked when the
View is paused. |
void |
onRestart()
Invoked when the
View is isRestarted. |
void |
onResume()
Invoked when the
View is resumed. |
void |
onStart()
Invoked when the
View is started. |
void |
onStop()
Invoked when the
View is stopped. |
void |
setInstanceStateSaved(boolean saved) |
public ViewState(View view)
public <T extends View> T getView()
public void setInstanceStateSaved(boolean saved)
public LifecycleState getLifecycleState()
LifecycleState
of this ViewState
.LifecycleState
.public boolean isDormant()
LifecycleState
is dormant. In dormant state the View
is either not instantiated or is instantiated but isnot created i.e. method
Fragment#onCreate(Bundle)
/Activity#onCreate(Bundle)
has not
been invoked yet.boolean
value.public boolean isCreated()
LifecycleState
is created. In created state the View
method Fragment#onCreate(Bundle)
/Activity#onCreate(Bundle)
has been invoked.boolean
value.public boolean isStarted()
LifecycleState
is started or resumed. In started state the method
Fragment#onStart()
/Activity#onStart()
and possibly Fragment#onResume()
/Activity#onResume()
have been invoked. Method getLifecycleState()
can be used to determinate
the exact lifecycle state.boolean
value.public boolean isResumed()
LifecycleState
is resumed. In resumed state both the methods
Fragment#onStart()
/Activity#onStart()
and Fragment#onResume()
/Activity#onResume()
have been invoked.boolean
value.public boolean isPaused()
LifecycleState
is paused. In paused state the method
Fragment#onPause()
/Activity#onPause()
has been invoked.boolean
value.public boolean isRestarted()
LifecycleState
is isRestarted. In isRestarted state the method
Activity#onRestart()
has been invoked.boolean
value.public boolean isStopped()
LifecycleState
is stopped. In stopped state the method
Fragment#onStop()
/Activity#onStop()
has been invoked.boolean
value.public boolean isDestroyed()
LifecycleState
is destroyed. In destroyed state the method
Fragment#onDestroy()
/Activity#onDestroy()
has been invoked.boolean
value.public void onCreate()
View
is created.public void onStart()
View
is started.public void onRestart()
View
is isRestarted.public void onPause()
View
is paused.public void onResume()
View
is resumed.public void onStop()
View
is stopped.public void onDestroy()
View
is destroyed.public boolean canCommitFragment()
public boolean isMovedToBackground()