public abstract class AbstractNumberPickerPreference extends DialogPreference
NumberPicker widgets.| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractNumberPickerPreference.SavedState
A data structure, which allows to save the internal state of an
AbstractNumberPickerPreference. |
| Constructor and Description |
|---|
AbstractNumberPickerPreference(android.content.Context context)
Creates a new preference, which allows to choose a decimal number via a
NumberPicker
widget. |
AbstractNumberPickerPreference(android.content.Context context,
android.util.AttributeSet attributeSet)
Creates a new preference, which allows to choose a decimal number via a
NumberPicker
widget. |
AbstractNumberPickerPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle)
Creates a new preference, which allows to choose a decimal number via a
NumberPicker
widget. |
AbstractNumberPickerPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle,
int defaultStyleResource)
Creates a new preference, which allows to choose a decimal number via a
NumberPicker
widget. |
| Modifier and Type | Method and Description |
|---|---|
int |
getNumber()
Returns the currently persisted number of the preference.
|
java.lang.CharSequence |
getSummary() |
java.lang.CharSequence |
getUnit()
Returns the unit, which is used for textual representation of the preference's number.
|
boolean |
isInputMethodUsed()
Returns, whether an input method is used by the preference, false otherwise.
|
boolean |
isSelectorWheelWrapped()
Returns, whether the selector wheel of the preference's
NumberPicker is wrapped, or
not. |
protected boolean |
needInputMethod()
The method, which is invoked on subclasses to determine, whether the soft input mode should
be requested when the preference's dialog becomes shown, or not.
|
protected java.lang.Object |
onGetDefaultValue(android.content.res.TypedArray typedArray,
int index) |
protected void |
onRestoreInstanceState(android.os.Parcelable state) |
protected android.os.Parcelable |
onSaveInstanceState() |
protected void |
onSetInitialValue(java.lang.Object defaultValue) |
void |
setNumber(int number)
Sets the current number of the preference.
|
void |
setUnit(java.lang.CharSequence unit)
Sets the unit, which should be used for textual representation of the preference's number.
|
void |
setUnit(int resourceId)
Sets the unit, which should be used for textual representation of the preference's number.
|
void |
useInputMethod(boolean useInputMethod)
Sets, whether an input method should be used by the preference, or not.
|
void |
wrapSelectorWheel(boolean wrapSelectorWheel)
Sets, whether the selector wheel of the preference's
NumberPicker should be wrapped,
or not. |
areDialogDividersShownOnScroll, createDialog, createDialogBuilder, getDialog, getDialogBackground, getDialogBottomMargin, getDialogButtonTextColor, getDialogButtonTypeface, getDialogCancelAnimation, getDialogDismissAnimation, getDialogDividerColor, getDialogDividerMargin, getDialogGravity, getDialogHeaderBackground, getDialogHeaderIcon, getDialogHeaderIconTintList, getDialogHeaderIconTintMode, getDialogHeight, getDialogIcon, getDialogIconTintList, getDialogIconTintMode, getDialogLeftMargin, getDialogMaxHeight, getDialogMaxWidth, getDialogMessage, getDialogMessageColor, getDialogMessageTypeface, getDialogPaddingBottom, getDialogPaddingLeft, getDialogPaddingRight, getDialogPaddingTop, getDialogRightMargin, getDialogScrollableArea, getDialogShowAnimation, getDialogTitle, getDialogTitleColor, getDialogTitleTypeface, getDialogTopMargin, getDialogWidth, getDialogWindowBackground, getNegativeButtonText, getPositiveButtonText, isDialogButtonBarDividerShown, isDialogFitsSystemWindowsBottom, isDialogFitsSystemWindowsLeft, isDialogFitsSystemWindowsRight, isDialogFitsSystemWindowsTop, isDialogFullscreen, isDialogHeaderShown, isDialogShown, isValueShownAsSummary, onCancel, onClick, onClick, onDialogClosed, onDismiss, onKey, onPrepareDialog, onShow, performClick, setCustomDialogButtonBar, setCustomDialogButtonBar, setCustomDialogHeader, setCustomDialogHeader, setCustomDialogMessage, setCustomDialogMessage, setCustomDialogTitle, setCustomDialogTitle, setDialogBackground, setDialogBackground, setDialogBackgroundColor, setDialogButtonTextColor, setDialogButtonTextColor, setDialogButtonTypeface, setDialogCancelAnimation, setDialogDismissAnimation, setDialogDividerColor, setDialogDividerMargin, setDialogFitsSystemWindows, setDialogFitsSystemWindows, setDialogFullscreen, setDialogGravity, setDialogHeaderBackground, setDialogHeaderBackground, setDialogHeaderBackgroundColor, setDialogHeaderIcon, setDialogHeaderIcon, setDialogHeaderIconTint, setDialogHeaderIconTintList, setDialogHeaderIconTintMode, setDialogHeight, setDialogIcon, setDialogIcon, setDialogIconTint, setDialogIconTintList, setDialogIconTintMode, setDialogMargin, setDialogMaxHeight, setDialogMaxWidth, setDialogMessage, setDialogMessage, setDialogMessageColor, setDialogMessageTypeface, setDialogPadding, setDialogScrollableArea, setDialogScrollableArea, setDialogShowAnimation, setDialogTitle, setDialogTitle, setDialogTitleColor, setDialogTitleTypeface, setDialogWidth, setDialogWindowBackground, setDialogWindowBackground, setNegativeButtonText, setNegativeButtonText, setOnCancelListener, setOnClickListener, setOnDismissListener, setOnKeyListener, setOnShowListener, setPositiveButtonText, setPositiveButtonText, showDialogButtonBarDivider, showDialogDividersOnScroll, showDialogHeader, showValueAsSummarygetIconTintList, getIconTintMode, setIcon, setIconTint, setIconTintList, setIconTintModepublic AbstractNumberPickerPreference(android.content.Context context)
NumberPicker
widget.context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullpublic AbstractNumberPickerPreference(android.content.Context context,
android.util.AttributeSet attributeSet)
NumberPicker
widget.context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullattributeSet - The attributes of the XML tag that is inflating the preference, as an instance of the
type AttributeSet or null, if no attributes are availablepublic AbstractNumberPickerPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle)
NumberPicker
widget.context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullattributeSet - The attributes of the XML tag that is inflating the preference, as an instance of the
type AttributeSet or null, if no attributes are availabledefaultStyle - The default style to apply to this preference. If 0, no style will be applied (beyond
what is included in the theme). This may either be an attribute resource, whose value
will be retrieved from the current theme, or an explicit style resourcepublic AbstractNumberPickerPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle,
int defaultStyleResource)
NumberPicker
widget.context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullattributeSet - The attributes of the XML tag that is inflating the preference, as an instance of the
type AttributeSet or null, if no attributes are availabledefaultStyle - The default style to apply to this preference. If 0, no style will be applied (beyond
what is included in the theme). This may either be an attribute resource, whose value
will be retrieved from the current theme, or an explicit style resourcedefaultStyleResource - A resource identifier of a style resource that supplies default values for the
preference, used only if the default style is 0 or can not be found in the theme. Can
be 0 to not look for defaultspublic final int getNumber()
Integer valuepublic void setNumber(int number)
number - The number, which should be set, as an Integer valuepublic final boolean isInputMethodUsed()
public void useInputMethod(boolean useInputMethod)
useInputMethod - True, if an input method should be used, false otherwisepublic final boolean isSelectorWheelWrapped()
NumberPicker is wrapped, or
not.NumberPicker is wrapped,
false otherwisepublic void wrapSelectorWheel(boolean wrapSelectorWheel)
NumberPicker should be wrapped,
or not.wrapSelectorWheel - True, if the selector wheel of the preference's NumberPicker should be
wrapped, false otherwisepublic final java.lang.CharSequence getUnit()
CharSequence or null, if no unit is usedpublic final void setUnit(java.lang.CharSequence unit)
unit - The unit, which should be set, as an instance of the type CharSequence or
null, if no unit should be usedpublic final void setUnit(int resourceId)
resourceId - The resource id of the unit, which should be set, as an Integer value. The
resource id must correspond to a valid string resourcepublic final java.lang.CharSequence getSummary()
protected final boolean needInputMethod()
DialogPreferenceneedInputMethod in class DialogPreferenceprotected final java.lang.Object onGetDefaultValue(android.content.res.TypedArray typedArray,
int index)
protected final void onSetInitialValue(java.lang.Object defaultValue)
protected android.os.Parcelable onSaveInstanceState()
onSaveInstanceState in class DialogPreferenceprotected void onRestoreInstanceState(android.os.Parcelable state)
onRestoreInstanceState in class DialogPreference