T
- the model objectpublic class ColorPickerInput<T> extends AbstractInput<T>
ColorPickerDialog
created on a ImageButton
clickModifier and Type | Class and Description |
---|---|
static interface |
ColorPickerInput.Callback<T>
The callback for this input, used to get/set values from/to the corresponding model object field
|
Constructor and Description |
---|
ColorPickerInput(boolean isUpdatedByExternalService,
Activity activity,
android.support.v4.app.FragmentManager fragmentManager,
View view,
int inputButtonId,
int dialogTitleResource,
int columnsNumber,
int[] colors,
ColorPickerInput.Callback<T> callback)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dismiss()
Method used to "close" the input, useful e.g.
|
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 ColorPickerInput(boolean isUpdatedByExternalService, Activity activity, android.support.v4.app.FragmentManager fragmentManager, View view, int inputButtonId, int dialogTitleResource, int columnsNumber, int[] colors, ColorPickerInput.Callback<T> callback)
isUpdatedByExternalService
- true if this input is updated by an external serviceactivity
- the activityfragmentManager
- the fragment managerview
- the view containing the button that opens the ColorPickerDialoginputButtonId
- the ID of the button that opens the SelectDialogdialogTitleResource
- the resource ID of the ColorPickerDialog titlecolumnsNumber
- the number of columns in the ColorPickerDialogcolors
- the optionscallback
- 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)