Class ColorPreference
java.lang.Object
android.preference.Preference
android.preference.DialogPreference
com.brightcove.player.captioning.preferences.ListDialogPreference
com.brightcove.player.captioning.preferences.ColorPreference
- All Implemented Interfaces:
android.content.DialogInterface.OnClickListener,android.content.DialogInterface.OnDismissListener,android.preference.PreferenceManager.OnActivityDestroyListener,Comparable<android.preference.Preference>
Grid preference that allows the user to pick a color from a predefined set of
colors. Optionally shows a preview in the preference item.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.brightcove.player.captioning.preferences.ListDialogPreference
ListDialogPreference.OnValueChangedListenerNested classes/interfaces inherited from class android.preference.Preference
android.preference.Preference.BaseSavedState, android.preference.Preference.OnPreferenceChangeListener, android.preference.Preference.OnPreferenceClickListener -
Field Summary
Fields inherited from class android.preference.Preference
DEFAULT_ORDER -
Constructor Summary
ConstructorsConstructorDescriptionColorPreference(android.content.Context context, android.util.AttributeSet attrs) -
Method Summary
Modifier and TypeMethodDescriptionprotected CharSequencegetTitleAt(int index) protected voidonBindListItem(android.view.View view, int index) Populates a list item view with data for the specified index.protected voidonBindView(android.view.View view) voidsetPreviewEnabled(boolean enabled) booleanThis determines whether the dependent preferences below this should be disabled.Methods inherited from class com.brightcove.player.captioning.preferences.ListDialogPreference
getIndexForValue, getSummary, getValue, getValueAt, onGetDefaultValue, onPrepareDialogBuilder, onRestoreInstanceState, onSaveInstanceState, onSetInitialValue, setListItemLayoutResource, setOnValueChangedListener, setTitles, setValue, setValuesMethods inherited from class android.preference.DialogPreference
getDialog, getDialogIcon, getDialogLayoutResource, getDialogMessage, getDialogTitle, getNegativeButtonText, getPositiveButtonText, onActivityDestroy, onBindDialogView, onClick, onClick, onCreateDialogView, onDialogClosed, onDismiss, setDialogIcon, setDialogIcon, setDialogLayoutResource, setDialogMessage, setDialogMessage, setDialogTitle, setDialogTitle, setNegativeButtonText, setNegativeButtonText, setPositiveButtonText, setPositiveButtonText, showDialogMethods inherited from class android.preference.Preference
callChangeListener, compareTo, findPreferenceInHierarchy, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getParent, getPersistedBoolean, getPersistedFloat, getPersistedInt, getPersistedLong, getPersistedString, getPersistedStringSet, getPreferenceDataStore, getPreferenceManager, getSharedPreferences, getShouldDisableView, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isIconSpaceReserved, isPersistent, isRecycleEnabled, isSelectable, isSingleLineTitle, notifyChanged, notifyDependencyChange, notifyHierarchyChanged, onAttachedToActivity, onAttachedToHierarchy, onCreateView, onDependencyChanged, onParentChanged, onPrepareForRemoval, peekExtras, persistBoolean, persistFloat, persistInt, persistLong, persistString, persistStringSet, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIconSpaceReserved, setIntent, setKey, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setPreferenceDataStore, setRecycleEnabled, setSelectable, setShouldDisableView, setSingleLineTitle, setSummary, setSummary, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldPersist, toString
-
Constructor Details
-
ColorPreference
public ColorPreference(android.content.Context context, android.util.AttributeSet attrs)
-
-
Method Details
-
setPreviewEnabled
public void setPreviewEnabled(boolean enabled) - Parameters:
enabled- whether to show a preview in the preference item
-
shouldDisableDependents
public 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.- Overrides:
shouldDisableDependentsin classandroid.preference.Preference
-
getTitleAt
- Overrides:
getTitleAtin classListDialogPreference- Returns:
- the title at the specified index, or null if none specified
-
onBindView
protected void onBindView(android.view.View view) - Overrides:
onBindViewin classandroid.preference.Preference
-
onBindListItem
protected void onBindListItem(android.view.View view, int index) Description copied from class:ListDialogPreferencePopulates a list item view with data for the specified index.- Specified by:
onBindListItemin classListDialogPreference- Parameters:
view- the view to populateindex- the index for which to populate the view- See Also:
-