T
- the model objectpublic class EditTextInput<T> extends AbstractInput<T>
EditText
Modifier and Type | Class and Description |
---|---|
static interface |
EditTextInput.Callback<T>
The callback for this input, used to get/set values from/to the corresponding model object field
|
static interface |
EditTextInput.CallbackExtended<T>
Extended callback that has additional methods to manage the input
|
Constructor and Description |
---|
EditTextInput(boolean isUpdatedByExternalService,
View view,
int inputId,
EditTextInput.Callback<T> callback)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dismiss()
Method used to "close" the input, useful e.g.
|
java.lang.String |
getText()
Getter
|
void |
restoreSpecificInstance(Bundle inState)
Called by
AbstractInput.restoreInstance(Bundle) for restoring the implementation instance |
void |
saveSpecificInstance(Bundle outState)
Called by
AbstractInput.saveInstance(Bundle) for saving the implementation instance |
void |
setInputFromModelObject(T modelObject)
Sets the input value equal to the corresponding model object value, calling the callback passed to the input constructor
|
void |
setModelObjectFromInput(T modelObject)
Sets the model object value equal to the corresponding input value, calling the callback passed to the input constructor
|
void |
setVisibility(int visibility) |
addDependentInput, areValueChangeListenersDisabled, isUpdatedByExternalService, restoreInstance, saveInstance, setAreValueChangeListenersDisabled, setWasChangedByUser, wasChangedByUser
public EditTextInput(boolean isUpdatedByExternalService, View view, int inputId, EditTextInput.Callback<T> callback)
isUpdatedByExternalService
- true if this input is updated by an external serviceview
- the view containing the EditTextinputId
- the EditText IDcallback
- the callback for this inputpublic void setInputFromModelObject(T modelObject)
setInputFromModelObject
in class AbstractInput<T>
modelObject
- the model object that will be queried for the input valuepublic void setModelObjectFromInput(T modelObject)
setModelObjectFromInput
in class AbstractInput<T>
modelObject
- the model object that will be updated with the input valuepublic void saveSpecificInstance(Bundle outState)
AbstractInput.saveInstance(Bundle)
for saving the implementation instancesaveSpecificInstance
in class AbstractInput<T>
outState
- the bundle where the state will be savedpublic void restoreSpecificInstance(Bundle inState)
AbstractInput.restoreInstance(Bundle)
for restoring the implementation instancerestoreSpecificInstance
in class AbstractInput<T>
inState
- the bundle containing the saved instance of this inputpublic void dismiss()
dismiss
in class AbstractInput<T>
public void setVisibility(int visibility)
setVisibility
in class AbstractInput<T>
android.view.View#setVisibility(int)
public java.lang.String getText()