Header
class Header : Parcelable
| kotlin.Any | |
| android.preference.PreferenceActivity.Header | |
This class was deprecated in API level 29.
Use the AndroidX Preference Library for consistent behavior across all devices. For more information on using the AndroidX Preference Library see Settings.
Description of a single Header item that the user can select.
Summary
| Inherited constants | |
|---|---|
| Public constructors | |
|---|---|
Header() |
|
| Public methods | |
|---|---|
| Int |
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| CharSequence! |
getBreadCrumbShortTitle(res: Resources!)Return the currently set bread crumb short title. |
| CharSequence! |
getBreadCrumbTitle(res: Resources!)Return the currently set bread crumb title. |
| CharSequence! |
getSummary(res: Resources!)Return the currently set summary. |
| CharSequence! |
Return the currently set title. |
| Unit |
readFromParcel(in: Parcel!) |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<PreferenceActivity.Header!> | |
| CharSequence! |
Optional text to show as the short title in the bread crumb. |
| Int |
Resource ID of optional text to show as the short title in the bread crumb. |
| CharSequence! |
Optional text to show as the title in the bread crumb. |
| Int |
Resource ID of optional text to show as the title in the bread crumb. |
| Bundle! |
Optional additional data for use by subclasses of PreferenceActivity. |
| String! |
Full class name of the fragment to display when this header is selected. |
| Bundle! |
Optional arguments to supply to the fragment when it is instantiated. |
| Int |
Optional icon resource to show for this header. |
| Long |
Identifier for this header, to correlate with a new list when it is updated. |
| Intent! |
Intent to launch when the preference is selected. |
| CharSequence! |
Optional summary describing what this header controls. |
| Int |
Resource ID of optional summary describing what this header controls. |
| CharSequence! |
Title of the header that is shown to the user. |
| Int |
Resource ID of title of the header that is shown to the user. |
Public constructors
Public methods
describeContents
fun describeContents(): Int
Deprecated: Deprecated in Java.
Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
getBreadCrumbShortTitle
fun getBreadCrumbShortTitle(res: Resources!): CharSequence!
Deprecated: Deprecated in Java.
Return the currently set bread crumb short title. If breadCrumbShortTitleRes is set, this resource is loaded from res and returned. Otherwise breadCrumbShortTitle is returned.
getBreadCrumbTitle
fun getBreadCrumbTitle(res: Resources!): CharSequence!
Deprecated: Deprecated in Java.
Return the currently set bread crumb title. If breadCrumbTitleRes is set, this resource is loaded from res and returned. Otherwise breadCrumbTitle is returned.
getSummary
fun getSummary(res: Resources!): CharSequence!
Deprecated: Deprecated in Java.
Return the currently set summary. If summaryRes is set, this resource is loaded from res and returned. Otherwise summary is returned.
getTitle
fun getTitle(res: Resources!): CharSequence!
Deprecated: Deprecated in Java.
Return the currently set title. If titleRes is set, this resource is loaded from res and returned. Otherwise title is returned.
readFromParcel
fun readFromParcel(in: Parcel!): Unit
Deprecated: Deprecated in Java.
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Deprecated: Deprecated in Java.
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: The Parcel in which the object should be written. This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|
Properties
CREATOR
static val CREATOR: Parcelable.Creator<PreferenceActivity.Header!>
Deprecated: Deprecated in Java.
breadCrumbShortTitle
var breadCrumbShortTitle: CharSequence!
Deprecated: Deprecated in Java.
Optional text to show as the short title in the bread crumb.
breadCrumbShortTitleRes
var breadCrumbShortTitleRes: Int
Deprecated: Deprecated in Java.
Resource ID of optional text to show as the short title in the bread crumb.
breadCrumbTitle
var breadCrumbTitle: CharSequence!
Deprecated: Deprecated in Java.
Optional text to show as the title in the bread crumb.
breadCrumbTitleRes
var breadCrumbTitleRes: Int
Deprecated: Deprecated in Java.
Resource ID of optional text to show as the title in the bread crumb.
extras
var extras: Bundle!
Deprecated: Deprecated in Java.
Optional additional data for use by subclasses of PreferenceActivity.
fragment
var fragment: String!
Deprecated: Deprecated in Java.
Full class name of the fragment to display when this header is selected.
fragmentArguments
var fragmentArguments: Bundle!
Deprecated: Deprecated in Java.
Optional arguments to supply to the fragment when it is instantiated.
iconRes
var iconRes: Int
Deprecated: Deprecated in Java.
Optional icon resource to show for this header.
id
var id: Long
Deprecated: Deprecated in Java.
Identifier for this header, to correlate with a new list when it is updated. The default value is PreferenceActivity.HEADER_ID_UNDEFINED, meaning no id.
intent
var intent: Intent!
Deprecated: Deprecated in Java.
Intent to launch when the preference is selected.
summary
var summary: CharSequence!
Deprecated: Deprecated in Java.
Optional summary describing what this header controls.
summaryRes
var summaryRes: Int
Deprecated: Deprecated in Java.
Resource ID of optional summary describing what this header controls.
title
var title: CharSequence!
Deprecated: Deprecated in Java.
Title of the header that is shown to the user.
titleRes
var titleRes: Int
Deprecated: Deprecated in Java.
Resource ID of title of the header that is shown to the user.