T
- the model objectpublic class SelectDialogInput<T> extends AbstractInput<T>
SelectDialog
created on a EditText
clickModifier and Type | Class and Description |
---|---|
static interface |
SelectDialogInput.Callback<T>
The callback for this input, used to get/set values from/to the corresponding model object field
|
static interface |
SelectDialogInput.CallbackExtended<T>
Extended callback that has additional methods to manage the input
|
Constructor and Description |
---|
SelectDialogInput(boolean isUpdatedByExternalService,
android.support.v4.app.FragmentManager fragmentManager,
View view,
int inputButtonId,
int dialogTitleResource,
java.lang.Object[] optionValues,
java.lang.String[] optionNames,
int[] optionIcons,
SelectDialogInput.Callback<T> callback)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dismiss()
Method used to "close" the input, useful e.g.
|
java.lang.Object |
getSelectedOptionValue()
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 SelectDialogInput(boolean isUpdatedByExternalService, android.support.v4.app.FragmentManager fragmentManager, View view, int inputButtonId, int dialogTitleResource, java.lang.Object[] optionValues, java.lang.String[] optionNames, int[] optionIcons, SelectDialogInput.Callback<T> callback)
isUpdatedByExternalService
- true if this input is updated by an external servicefragmentManager
- the fragment managerview
- the view containing the button that opens the SelectDialoginputButtonId
- the ID of the button that opens the SelectDialogdialogTitleResource
- the resource ID of the SelectDialog titleoptionValues
- the option valuesoptionNames
- the option namesoptionIcons
- the option icons (can be null if no icons are to be set)callback
- 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.Object getSelectedOptionValue()