public class ActionPreference extends Preference
| Constructor and Description |
|---|
ActionPreference(android.content.Context context)
Creates a new preference, which acts as a button and displays a centered title.
|
ActionPreference(android.content.Context context,
android.util.AttributeSet attributeSet)
Creates a new preference, which acts as a button and displays a centered title.
|
ActionPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle)
Creates a new preference, which acts as a button and displays a centered title.
|
ActionPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle,
int defaultStyleResource)
Creates a new preference, which acts as a button and displays a centered title.
|
| Modifier and Type | Method and Description |
|---|---|
android.content.res.ColorStateList |
getTextColor()
Returns the text color of the preference's title.
|
void |
onBindViewHolder(PreferenceViewHolder holder) |
void |
performClick()
Performs a click on the preference.
|
void |
setTextColor(android.content.res.ColorStateList colorStateList) |
void |
setTextColor(int color)
Sets the text color of the preference's title.
|
getIconTintList, getIconTintMode, setIcon, setIconTint, setIconTintList, setIconTintModepublic ActionPreference(android.content.Context context)
context - The context, which should be used by the preference, as an instance of the class
Context. The context may not be nullpublic ActionPreference(android.content.Context context,
android.util.AttributeSet attributeSet)
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 ActionPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle)
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 ActionPreference(android.content.Context context,
android.util.AttributeSet attributeSet,
int defaultStyle,
int defaultStyleResource)
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 android.content.res.ColorStateList getTextColor()
ColorStateList. The color state list may not be nullpublic final void setTextColor(int color)
color - The color, which should be set, as an Integer valuepublic final void setTextColor(android.content.res.ColorStateList colorStateList)
public final void performClick()
PreferenceperformClick in class Preferencepublic void onBindViewHolder(PreferenceViewHolder holder)