belongs to Maven artifact com.android.support:preference-v7:28.0.0-alpha1
SeekBarPreference
public
class
SeekBarPreference
extends Preference
java.lang.Object | ||
↳ | android.support.v7.preference.Preference | |
↳ | android.support.v7.preference.SeekBarPreference |
Preference based on android.preference.SeekBarPreference but uses support v7 preference as base.
It contains a title and a seekbar and an optional seekbar value TextView. The actual preference
layout is customizable by setting android:layout
on the preference widget layout or
seekBarPreferenceStyle
attribute.
The seekbar within the preference can be defined adjustable or not by setting adjustable
attribute. If adjustable, the preference will be responsive to DPAD left/right keys.
Otherwise, it skips those keys.
The seekbar value view can be shown or disabled by setting showSeekBarValue
attribute
to true or false, respectively.
Other SeekBar specific attributes (e.g. title, summary, defaultValue, min, max
) can be
set directly on the preference widget layout.
Summary
Inherited XML attributes | |
---|---|
![]()
android.support.v7.preference.Preference
|
Inherited constants |
---|
![]()
android.support.v7.preference.Preference
|
Public constructors | |
---|---|
SeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)
|
|
SeekBarPreference(Context context, AttributeSet attrs, int defStyleAttr)
|
|
SeekBarPreference(Context context, AttributeSet attrs)
|
|
SeekBarPreference(Context context)
|
Public methods | |
---|---|
int
|
getMax()
|
int
|
getMin()
|
final
int
|
getSeekBarIncrement()
Returns the amount of increment change via each arrow key click. |
int
|
getValue()
|
boolean
|
isAdjustable()
|
void
|
onBindViewHolder(PreferenceViewHolder view)
Binds the created View to the data for this Preference. |
void
|
setAdjustable(boolean adjustable)
|
final
void
|
setMax(int max)
|
void
|
setMin(int min)
|
final
void
|
setSeekBarIncrement(int seekBarIncrement)
Sets the increment amount on the SeekBar for each arrow key press. |
void
|
setValue(int seekBarValue)
|
Protected methods | |
---|---|
Object
|
onGetDefaultValue(TypedArray a, int index)
Called when a Preference is being inflated and the default value attribute needs to be read. |
void
|
|