-
- All Implemented Interfaces:
-
android.content.DialogInterface.OnClickListener
,android.content.DialogInterface.OnDismissListener
,android.preference.PreferenceManager.OnActivityDestroyListener
,java.lang.Comparable
public class ColorPreference extends ListDialogPreference
Grid preference that allows the user to pick a color from a predefined set of colors. Optionally shows a preview in the preference item.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
previewEnabled
-
Constructor Summary
Constructors Constructor Description ColorPreference(Context context, AttributeSet attrs)
-
Method Summary
Modifier and Type Method Description void
setPreviewEnabled(boolean enabled)
boolean
shouldDisableDependents()
This determines whether the dependent preferences below this should be disabled.In this case, the dependent should be disabled if the color is NONE. -
Methods inherited from class com.brightcove.player.captioning.preferences.ListDialogPreference
getSummary, getValue, setListItemLayoutResource, setOnValueChangedListener, setTitles, setValue, setValues
-
Methods inherited from class android.preference.DialogPreference
getDialog, getDialogIcon, getDialogLayoutResource, getDialogMessage, getDialogTitle, getNegativeButtonText, getPositiveButtonText, onActivityDestroy, onDismiss, setDialogIcon, setDialogLayoutResource, setDialogMessage, setDialogTitle, setNegativeButtonText, setPositiveButtonText
-
Methods inherited from class android.preference.Preference
compareTo, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getParent, getPersistedStringSet, getPreferenceDataStore, getPreferenceManager, getSharedPreferences, getShouldDisableView, getSummary, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isIconSpaceReserved, isPersistent, isRecycleEnabled, isSelectable, isSingleLineTitle, notifyDependencyChange, onDependencyChanged, onParentChanged, peekExtras, persistStringSet, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIconSpaceReserved, setIntent, setKey, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setPreferenceDataStore, setRecycleEnabled, setSelectable, setShouldDisableView, setSingleLineTitle, setSummary, setTitle, setWidgetLayoutResource, shouldCommit, shouldDisableDependents, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ColorPreference
ColorPreference(Context context, AttributeSet attrs)
-
-
Method Detail
-
setPreviewEnabled
void setPreviewEnabled(boolean enabled)
- Parameters:
enabled
- whether to show a preview in the preference item
-
shouldDisableDependents
boolean shouldDisableDependents()
This determines whether the dependent preferences below this should be disabled.In this case, the dependent should be disabled if the color is NONE.
-
-
-
-