public class VolumePreference extends SeekBarDialogPreference implements PreferenceManager.OnActivityStopListener, View.OnKeyListener, SeekBarVolumizer.Callback
Modifier and Type | Class and Description |
---|---|
static class |
VolumePreference.VolumeStore |
Preference.BaseSavedState, Preference.OnPreferenceChangeListener, Preference.OnPreferenceClickListener
DEFAULT_ORDER
Constructor and Description |
---|
VolumePreference(Context context) |
VolumePreference(Context context,
AttributeSet attrs) |
VolumePreference(Context context,
AttributeSet attrs,
int defStyleAttr) |
VolumePreference(Context context,
AttributeSet attrs,
int defStyleAttr,
int defStyleRes) |
Modifier and Type | Method and Description |
---|---|
void |
onActivityStop()
See Activity's onStop.
|
protected void |
onBindDialogView(View view)
Binds views in the content View of the dialog to data.
|
protected void |
onDialogClosed(boolean positiveResult)
Called when the dialog is dismissed and should be used to save data to
the
SharedPreferences . |
boolean |
onKey(View v,
int keyCode,
KeyEvent event)
Allows a Preference to intercept key events without having focus.
|
void |
onMuted(boolean muted,
boolean zenMuted) |
void |
onProgressChanged(SeekBar seekBar,
int progress,
boolean fromTouch) |
protected void |
onRestoreInstanceState(Parcelable state)
Hook allowing a Preference to re-apply a representation of its internal
state that had previously been generated by
Preference.onSaveInstanceState() . |
void |
onSampleStarting(SeekBarVolumizer volumizer) |
protected Parcelable |
onSaveInstanceState()
Hook allowing a Preference to generate a representation of its internal
state that can later be used to create a new instance with that same
state.
|
void |
setStreamType(int streamType) |
createActionButtons, getSeekBar
getDialog, getDialogIcon, getDialogLayoutResource, getDialogMessage, getDialogTitle, getNegativeButtonText, getPositiveButtonText, needInputMethod, onActivityDestroy, onClick, onClick, onCreateDialogView, onDismiss, onPrepareDialogBuilder, setDialogIcon, setDialogIcon, setDialogLayoutResource, setDialogMessage, setDialogMessage, setDialogTitle, setDialogTitle, setNegativeButtonText, setNegativeButtonText, setPositiveButtonText, setPositiveButtonText, showDialog
callChangeListener, compareTo, findPreferenceInHierarchy, getContext, getDependency, getEditor, getExtras, getFragment, getIcon, getIntent, getKey, getLayoutResource, getOnPreferenceChangeListener, getOnPreferenceClickListener, getOrder, getPersistedBoolean, getPersistedFloat, getPersistedInt, getPersistedLong, getPersistedString, getPersistedStringSet, getPreferenceManager, getSharedPreferences, getShouldDisableView, getSummary, getTitle, getTitleRes, getView, getWidgetLayoutResource, hasKey, isEnabled, isPersistent, isSelectable, notifyChanged, notifyDependencyChange, notifyHierarchyChanged, onAttachedToActivity, onAttachedToHierarchy, onBindView, onCreateView, onDependencyChanged, onGetDefaultValue, onParentChanged, onPrepareForRemoval, onSetInitialValue, peekExtras, performClick, persistBoolean, persistFloat, persistInt, persistLong, persistString, persistStringSet, restoreHierarchyState, saveHierarchyState, setDefaultValue, setDependency, setEnabled, setFragment, setIcon, setIcon, setIntent, setKey, setLayoutResource, setOnPreferenceChangeListener, setOnPreferenceClickListener, setOrder, setPersistent, setSelectable, setShouldDisableView, setSummary, setSummary, setTitle, setTitle, setWidgetLayoutResource, shouldCommit, shouldDisableDependents, shouldPersist, toString
public VolumePreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
public VolumePreference(Context context, AttributeSet attrs, int defStyleAttr)
public VolumePreference(Context context, AttributeSet attrs)
public VolumePreference(Context context)
public void setStreamType(int streamType)
protected void onBindDialogView(View view)
DialogPreference
Make sure to call through to the superclass implementation.
onBindDialogView
in class SeekBarDialogPreference
view
- The content View of the dialog, if it is custom.public boolean onKey(View v, int keyCode, KeyEvent event)
Preference
onKey
in interface View.OnKeyListener
onKey
in class Preference
v
- The view the key has been dispatched to.keyCode
- The code for the physical key that was pressedevent
- The KeyEvent object containing full information about
the event.protected void onDialogClosed(boolean positiveResult)
DialogPreference
SharedPreferences
.onDialogClosed
in class DialogPreference
positiveResult
- Whether the positive button was clicked (true), or
the negative button was clicked or the dialog was canceled (false).public void onActivityStop()
PreferenceManager.OnActivityStopListener
onActivityStop
in interface PreferenceManager.OnActivityStopListener
public void onSampleStarting(SeekBarVolumizer volumizer)
onSampleStarting
in interface SeekBarVolumizer.Callback
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromTouch)
onProgressChanged
in interface SeekBarVolumizer.Callback
public void onMuted(boolean muted, boolean zenMuted)
onMuted
in interface SeekBarVolumizer.Callback
protected Parcelable onSaveInstanceState()
Preference
onSaveInstanceState
in class DialogPreference
Preference.onRestoreInstanceState(android.os.Parcelable)
,
Preference.saveHierarchyState(android.os.Bundle)
protected void onRestoreInstanceState(Parcelable state)
Preference
Preference.onSaveInstanceState()
.
This function will never be called with a null state.onRestoreInstanceState
in class DialogPreference
state
- The saved state that had previously been returned by
Preference.onSaveInstanceState()
.Preference.onSaveInstanceState()
,
Preference.restoreHierarchyState(android.os.Bundle)