public static final class PreferenceActivity.Header extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
CharSequence |
breadCrumbShortTitle
Optional text to show as the short title in the bread crumb.
|
int |
breadCrumbShortTitleRes
Resource ID of optional text to show as the short title in the bread crumb.
|
CharSequence |
breadCrumbTitle
Optional text to show as the title in the bread crumb.
|
int |
breadCrumbTitleRes
Resource ID of optional text to show as the title in the bread crumb.
|
static Parcelable.Creator<PreferenceActivity.Header> |
CREATOR |
Bundle |
extras
Optional additional data for use by subclasses of PreferenceActivity.
|
String |
fragment
Full class name of the fragment to display when this header is
selected.
|
Bundle |
fragmentArguments
Optional arguments to supply to the fragment when it is
instantiated.
|
int |
iconRes
Optional icon resource to show for this header.
|
long |
id
Identifier for this header, to correlate with a new list when
it is updated.
|
Intent |
intent
Intent to launch when the preference is selected.
|
CharSequence |
summary
Optional summary describing what this header controls.
|
int |
summaryRes
Resource ID of optional summary describing what this header controls.
|
CharSequence |
title
Title of the header that is shown to the user.
|
int |
titleRes
Resource ID of title of the header that is shown to the user.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
Header() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
CharSequence |
getBreadCrumbShortTitle(Resources res)
Return the currently set bread crumb short title.
|
CharSequence |
getBreadCrumbTitle(Resources res)
Return the currently set bread crumb title.
|
CharSequence |
getSummary(Resources res)
Return the currently set summary.
|
CharSequence |
getTitle(Resources res)
Return the currently set title.
|
void |
readFromParcel(Parcel in) |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public long id
PreferenceActivity.HEADER_ID_UNDEFINED
, meaning no id.@StringRes public int titleRes
public CharSequence title
@StringRes public int summaryRes
public CharSequence summary
@StringRes public int breadCrumbTitleRes
public CharSequence breadCrumbTitle
@StringRes public int breadCrumbShortTitleRes
public CharSequence breadCrumbShortTitle
public int iconRes
public String fragment
public Bundle fragmentArguments
public Intent intent
public Bundle extras
public static final Parcelable.Creator<PreferenceActivity.Header> CREATOR
public CharSequence getTitle(Resources res)
public CharSequence getSummary(Resources res)
summaryRes
is set,
this resource is loaded from res and returned. Otherwise
summary
is returned.public CharSequence getBreadCrumbTitle(Resources res)
breadCrumbTitleRes
is set,
this resource is loaded from res and returned. Otherwise
breadCrumbTitle
is returned.public CharSequence getBreadCrumbShortTitle(Resources res)
breadCrumbShortTitleRes
is set,
this resource is loaded from res and returned. Otherwise
breadCrumbShortTitle
is returned.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public void readFromParcel(Parcel in)