Google is committed to advancing racial equity for Black communities. See how.
Added in API level 11
Deprecated in API level 29

Header

class Header : Parcelable
kotlin.Any
   ↳ android.preference.PreferenceActivity.Header

Description of a single Header item that the user can select.

Summary

Inherited constants

Public constructors

Public methods

Int

CharSequence!

Return the currently set bread crumb short title.

CharSequence!

Return the currently set bread crumb title.

CharSequence!

Return the currently set summary.

CharSequence!

Return the currently set title.

Unit

Unit
writeToParcel(dest: Parcel!, flags: Int)

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

<init>

Added in API level 11
Header()

Public methods

describeContents

Added in API level 11
Deprecated in API level 29
fun describeContents(): Int

Deprecated.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getBreadCrumbShortTitle

Added in API level 11
Deprecated in API level 29
fun getBreadCrumbShortTitle(res: Resources!): CharSequence!

Deprecated.

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

Added in API level 11
Deprecated in API level 29
fun getBreadCrumbTitle(res: Resources!): CharSequence!

Deprecated.

Return the currently set bread crumb title. If breadCrumbTitleRes is set, this resource is loaded from res and returned. Otherwise breadCrumbTitle is returned.

getSummary

Added in API level 11
Deprecated in API level 29
fun getSummary(res: Resources!): CharSequence!

Deprecated.

Return the currently set summary. If summaryRes is set, this resource is loaded from res and returned. Otherwise summary is returned.

getTitle

Added in API level 11
Deprecated in API level 29
fun getTitle(res: Resources!): CharSequence!

Deprecated.

Return the currently set title. If titleRes is set, this resource is loaded from res and returned. Otherwise title is returned.

readFromParcel

Added in API level 11
Deprecated in API level 29
fun readFromParcel(in: Parcel!): Unit

Deprecated.

writeToParcel

Added in API level 11
Deprecated in API level 29
fun writeToParcel(
    dest: Parcel!,
    flags: Int
): Unit

Deprecated.

Parameters
dest Parcel!: The Parcel in which the object should be written.
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 android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 11
Deprecated in API level 29
static val CREATOR: Parcelable.Creator<PreferenceActivity.Header!>

Deprecated.

Added in API level 11
Deprecated in API level 29
var breadCrumbShortTitle: CharSequence!

Deprecated.

Optional text to show as the short title in the bread crumb.

Added in API level 11
Deprecated in API level 29
var breadCrumbShortTitleRes: Int

Deprecated.

Resource ID of optional text to show as the short title in the bread crumb.

Added in API level 11
Deprecated in API level 29
var breadCrumbTitle: CharSequence!

Deprecated.

Optional text to show as the title in the bread crumb.

Added in API level 11
Deprecated in API level 29
var breadCrumbTitleRes: Int

Deprecated.

Resource ID of optional text to show as the title in the bread crumb.

extras

Added in API level 11
Deprecated in API level 29
var extras: Bundle!

Deprecated.

Optional additional data for use by subclasses of PreferenceActivity.

fragment

Added in API level 11
Deprecated in API level 29
var fragment: String!

Deprecated.

Full class name of the fragment to display when this header is selected.

fragmentArguments

Added in API level 11
Deprecated in API level 29
var fragmentArguments: Bundle!

Deprecated.

Optional arguments to supply to the fragment when it is instantiated.

iconRes

Added in API level 11
Deprecated in API level 29
var iconRes: Int

Deprecated.

Optional icon resource to show for this header.

id

Added in API level 11
Deprecated in API level 29
var id: Long

Deprecated.

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

Added in API level 11
Deprecated in API level 29
var intent: Intent!

Deprecated.

Intent to launch when the preference is selected.

summary

Added in API level 11
Deprecated in API level 29
var summary: CharSequence!

Deprecated.

Optional summary describing what this header controls.

summaryRes

Added in API level 11
Deprecated in API level 29
var summaryRes: Int

Deprecated.

Resource ID of optional summary describing what this header controls.

title

Added in API level 11
Deprecated in API level 29
var title: CharSequence!

Deprecated.

Title of the header that is shown to the user.

titleRes

Added in API level 11
Deprecated in API level 29
var titleRes: Int

Deprecated.

Resource ID of title of the header that is shown to the user.