SliceItem
classSliceItem: Parcelable
kotlin.Any | |
↳ | android.app.slice.SliceItem |
A SliceItem is a single unit in the tree structure of a Slice
. A SliceItem a piece of content and some hints about what that content means or how it should be displayed. The types of content can be:
FORMAT_SLICE
FORMAT_TEXT
FORMAT_IMAGE
FORMAT_ACTION
FORMAT_INT
FORMAT_LONG
FORMAT_REMOTE_INPUT
FORMAT_BUNDLE
SliceItem
are a set of strings which annotate the content. The hints that are guaranteed to be understood by the system are defined on Slice
.
Summary
Constants | |
---|---|
static String |
A |
static String | |
static String | |
static String |
A |
static String |
A |
static String |
A |
static String | |
static String |
A |
Inherited constants | |
---|---|
Public methods | |
---|---|
Int | |
PendingIntent! | |
Bundle! | |
String! |
Get the format of this SliceItem. |
MutableList<String!> |
getHints() Gets all hints associated with this SliceItem. |
Icon! |
getIcon() |
Int |
getInt() |
Long |
getLong() |
RemoteInput! | |
Slice! |
getSlice() |
String! |
Get the sub-type of this SliceItem. |
CharSequence! |
getText() |
Boolean | |
Unit |
writeToParcel(dest: Parcel, flags: Int) |
Properties | |
---|---|
static Parcelable.Creator<SliceItem!> |
Constants
FORMAT_ACTION
static valFORMAT_ACTION: String
Deprecated: Deprecated in Java.
A SliceItem
that contains a PendingIntent
Note: Actions contain 2 pieces of data, In addition to the pending intent, the item contains a Slice
that the action applies to.
Value: "action"
FORMAT_BUNDLE
static valFORMAT_BUNDLE: String
Deprecated: Deprecated in Java.
A SliceItem
that contains a Bundle
.
Value: "bundle"
FORMAT_IMAGE
static valFORMAT_IMAGE: String
Deprecated: Deprecated in Java.
A SliceItem
that contains an Icon
Value: "image"
FORMAT_INT
static valFORMAT_INT: String
Deprecated: Deprecated in Java.
A SliceItem
that contains an int.
Value: "int"
FORMAT_LONG
static valFORMAT_LONG: String
Deprecated: Deprecated in Java.
A SliceItem
that contains a long.
Value: "long"
FORMAT_REMOTE_INPUT
static valFORMAT_REMOTE_INPUT: String
Deprecated: Deprecated in Java.
A SliceItem
that contains a RemoteInput
.
Value: "input"
FORMAT_SLICE
static valFORMAT_SLICE: String
Deprecated: Deprecated in Java.
A SliceItem
that contains a Slice
Value: "slice"
FORMAT_TEXT
static valFORMAT_TEXT: String
Deprecated: Deprecated in Java.
A SliceItem
that contains a CharSequence
Value: "text"
Public methods
describeContents
fundescribeContents(): Int
Deprecated: Deprecated in Java.
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 |
getAction
fungetAction(): PendingIntent!
Deprecated: Deprecated in Java.
Return | |
---|---|
PendingIntent! |
The pending intent held by this FORMAT_ACTION SliceItem |
getBundle
fungetBundle(): Bundle!
Deprecated: Deprecated in Java.
Return | |
---|---|
Bundle! |
The parcelable held by this FORMAT_BUNDLE SliceItem |
getFormat
fungetFormat(): String!
Deprecated: Deprecated in Java.
Get the format of this SliceItem.
The format will be one of the following types supported by the platform:
FORMAT_SLICE
FORMAT_TEXT
FORMAT_IMAGE
FORMAT_ACTION
FORMAT_INT
FORMAT_LONG
FORMAT_REMOTE_INPUT
FORMAT_BUNDLE
See Also
getHints
fungetHints(): MutableList<String!>
Deprecated: Deprecated in Java.
Gets all hints associated with this SliceItem.
getIcon
fungetIcon(): Icon!
Deprecated: Deprecated in Java.
Return | |
---|---|
Icon! |
The icon held by this FORMAT_IMAGE SliceItem |
getInt
fungetInt(): Int
Deprecated: Deprecated in Java.
Return | |
---|---|
Int |
The color held by this FORMAT_INT SliceItem |
getLong
fungetLong(): Long
Deprecated: Deprecated in Java.
Return | |
---|---|
Long |
The long held by this FORMAT_LONG SliceItem |
getRemoteInput
fungetRemoteInput(): RemoteInput!
Deprecated: Deprecated in Java.
Return | |
---|---|
RemoteInput! |
The remote input held by this FORMAT_REMOTE_INPUT SliceItem |
getSlice
fungetSlice(): Slice!
Deprecated: Deprecated in Java.
Return | |
---|---|
Slice! |
The slice held by this FORMAT_ACTION or FORMAT_SLICE SliceItem |
getSubType
fungetSubType(): String!
Deprecated: Deprecated in Java.
Get the sub-type of this SliceItem.
Subtypes provide additional information about the type of this information beyond basic interpretations inferred by getFormat()
. For example a slice may contain many FORMAT_TEXT
items, but only some of them may be Slice.SUBTYPE_MESSAGE
.
See Also
getText
fungetText(): CharSequence!
Deprecated: Deprecated in Java.
Return | |
---|---|
CharSequence! |
The text held by this FORMAT_TEXT SliceItem |
hasHint
funhasHint(hint: String!): Boolean
Deprecated: Deprecated in Java.
Return | |
---|---|
Boolean |
true if this item contains the given hint |
writeToParcel
funwriteToParcel(
dest: Parcel,
flags: Int
): Unit
Deprecated: Deprecated in Java.
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 android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE , and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES |
Properties
CREATOR
static valCREATOR: Parcelable.Creator<SliceItem!>
Deprecated: Deprecated in Java.