T
- the model objectpublic abstract class AbstractInput<T>
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
void |
addDependentInput(AbstractInput input)
Adds an input to the dependent inputs list.
|
boolean |
areValueChangeListenersDisabled()
Getter
|
abstract void |
dismiss()
Method used to "close" the input, useful e.g.
|
boolean |
isUpdatedByExternalService()
Getter
|
void |
restoreInstance(Bundle inState)
Restores this input previously saved instance from the given bundle
|
protected abstract void |
restoreSpecificInstance(Bundle inState)
Called by
restoreInstance(Bundle) for restoring the implementation instance |
void |
saveInstance(Bundle outState)
Saves this input instance in the given bundle, in order to be able to restore it later
|
protected abstract void |
saveSpecificInstance(Bundle outState)
Called by
saveInstance(Bundle) for saving the implementation instance |
void |
setAreValueChangeListenersDisabled(boolean areValueChangeCallbacksDisabled)
Setter
|
abstract void |
setInputFromModelObject(T modelObject)
Sets the input value equal to the corresponding model object value, calling the callback passed to the input constructor
|
abstract void |
setModelObjectFromInput(T modelObject)
Sets the model object value equal to the corresponding input value, calling the callback passed to the input constructor
|
abstract void |
setVisibility(int visibility) |
void |
setWasChangedByUser(boolean wasChangedByUser)
Setter
|
boolean |
wasChangedByUser()
Getter
|
public abstract void setInputFromModelObject(T modelObject)
modelObject
- the model object that will be queried for the input valuepublic abstract void setModelObjectFromInput(T modelObject)
modelObject
- the model object that will be updated with the input valuepublic void saveInstance(Bundle outState)
outState
- the bundle where the state will be savedprotected abstract void saveSpecificInstance(Bundle outState)
saveInstance(Bundle)
for saving the implementation instanceoutState
- the bundle where the state will be savedpublic void restoreInstance(Bundle inState)
inState
- the bundle containing the saved instance of this inputprotected abstract void restoreSpecificInstance(Bundle inState)
restoreInstance(Bundle)
for restoring the implementation instanceinState
- the bundle containing the saved instance of this inputpublic boolean isUpdatedByExternalService()
public abstract void dismiss()
public abstract void setVisibility(int visibility)
android.view.View#setVisibility(int)
public boolean areValueChangeListenersDisabled()
public void setAreValueChangeListenersDisabled(boolean areValueChangeCallbacksDisabled)
areValueChangeCallbacksDisabled
- true if value change listeners should be disabled, i.e. no value change callbacks are to be called, "wasChangedByUser" is updated, etc.public boolean wasChangedByUser()
public void setWasChangedByUser(boolean wasChangedByUser)
wasChangedByUser
- true if the input was changed by the user in this sessionpublic void addDependentInput(AbstractInput input)
input
- the dependent input to add