Builder
classBuilder
kotlin.Any | |
↳ | android.app.slice.Slice.Builder |
A Builder used to construct Slice
s
Summary
Public constructors | |
---|---|
Builder(parent: Slice.Builder) Create a builder for a |
|
Create a builder which will construct a |
Public methods | |
---|---|
open Slice.Builder! |
addAction(action: PendingIntent, s: Slice, subType: String?) Add an action to the slice being constructed |
open Slice.Builder! |
addBundle(bundle: Bundle!, subType: String?, hints: MutableList<String!>!) Add a bundle to the slice being constructed. |
open Slice.Builder! |
addHints(hints: MutableList<String!>!) Add hints to the Slice being constructed |
open Slice.Builder! |
addIcon(icon: Icon!, subType: String?, hints: MutableList<String!>!) Add an image to the slice being constructed |
open Slice.Builder! |
addInt(value: Int, subType: String?, hints: MutableList<String!>!) Add an integer to the slice being constructed |
open Slice.Builder! |
addLong(value: Long, subType: String?, hints: MutableList<String!>!) Add a long to the slice being constructed |
open Slice.Builder! |
addRemoteInput(remoteInput: RemoteInput!, subType: String?, hints: MutableList<String!>!) Add remote input to the slice being constructed |
open Slice.Builder! |
addSubSlice(slice: Slice, subType: String?) Add a sub-slice to the slice being constructed |
open Slice.Builder! |
addText(text: CharSequence!, subType: String?, hints: MutableList<String!>!) Add text to the slice being constructed |
open Slice! |
build() Construct the slice. |
open Slice.Builder! |
setCallerNeeded(callerNeeded: Boolean) Tells the system whether for this slice the return value of |
Public constructors
Builder
Builder(parent: Slice.Builder)
Create a builder for a Slice
that is a sub-slice of the slice being constructed by the provided builder.
Parameters | |
---|---|
parent |
Slice.Builder: The builder constructing the parent slice This value cannot be null . |
Builder
Builder(
uri: Uri,
spec: SliceSpec!)
Create a builder which will construct a Slice
for the given Uri.
Parameters | |
---|---|
uri |
Uri: Uri to tag for this slice. This value cannot be null . |
spec |
SliceSpec!: the spec for this slice. |
Public methods
addAction
open funaddAction(
action: PendingIntent,
s: Slice,
subType: String?
): Slice.Builder!
Deprecated: Deprecated in Java.
Add an action to the slice being constructed
Parameters | |
---|---|
subType |
String?: Optional template-specific type information This value may be null . Value is android.app.slice.Slice#SUBTYPE_COLOR , android.app.slice.Slice#SUBTYPE_CONTENT_DESCRIPTION , android.app.slice.Slice#SUBTYPE_MAX , android.app.slice.Slice#SUBTYPE_MESSAGE , android.app.slice.Slice#SUBTYPE_PRIORITY , android.app.slice.Slice#SUBTYPE_RANGE , android.app.slice.Slice#SUBTYPE_SOURCE , android.app.slice.Slice#SUBTYPE_TOGGLE , android.app.slice.Slice#SUBTYPE_VALUE , or android.app.slice.Slice#SUBTYPE_LAYOUT_DIRECTION |
action |
PendingIntent: This value cannot be null . |
s |
Slice: This value cannot be null . |
addBundle
open funaddBundle(
bundle: Bundle!,
subType: String?,
hints: MutableList<String!>!
): Slice.Builder!
Deprecated: Deprecated in Java.
Add a bundle to the slice being constructed.
Expected to be used for support library extension, should not be used for general development
addHints
open funaddHints(hints: MutableList<String!>!): Slice.Builder!
Deprecated: Deprecated in Java.
Add hints to the Slice being constructed
addIcon
open funaddIcon(
icon: Icon!,
subType: String?,
hints: MutableList<String!>!
): Slice.Builder!
Deprecated: Deprecated in Java.
Add an image to the slice being constructed
addInt
open funaddInt(
value: Int,
subType: String?,
hints: MutableList<String!>!
): Slice.Builder!
Deprecated: Deprecated in Java.
Add an integer to the slice being constructed
addLong
open funaddLong(
value: Long,
subType: String?,
hints: MutableList<String!>!
): Slice.Builder!
Deprecated: Deprecated in Java.
Add a long to the slice being constructed
addRemoteInput
open funaddRemoteInput(
remoteInput: RemoteInput!,
subType: String?,
hints: MutableList<String!>!
): Slice.Builder!
Deprecated: Deprecated in Java.
Add remote input to the slice being constructed
addSubSlice
open funaddSubSlice(
slice: Slice,
subType: String?
): Slice.Builder!
Deprecated: Deprecated in Java.
Add a sub-slice to the slice being constructed
Parameters | |
---|---|
subType |
String?: Optional template-specific type information This value may be null . Value is android.app.slice.Slice#SUBTYPE_COLOR , android.app.slice.Slice#SUBTYPE_CONTENT_DESCRIPTION , android.app.slice.Slice#SUBTYPE_MAX , android.app.slice.Slice#SUBTYPE_MESSAGE , android.app.slice.Slice#SUBTYPE_PRIORITY , android.app.slice.Slice#SUBTYPE_RANGE , android.app.slice.Slice#SUBTYPE_SOURCE , android.app.slice.Slice#SUBTYPE_TOGGLE , android.app.slice.Slice#SUBTYPE_VALUE , or android.app.slice.Slice#SUBTYPE_LAYOUT_DIRECTION |
slice |
Slice: This value cannot be null . |
addText
open funaddText(
text: CharSequence!,
subType: String?,
hints: MutableList<String!>!
): Slice.Builder!
Deprecated: Deprecated in Java.
Add text to the slice being constructed
build
open funbuild(): Slice!
Deprecated: Deprecated in Java.
Construct the slice.
setCallerNeeded
open funsetCallerNeeded(callerNeeded: Boolean): Slice.Builder!
Deprecated: Deprecated in Java.
Tells the system whether for this slice the return value of SliceProvider.onBindSlice(Uri, java.util.Set)
may be different depending on SliceProvider.getCallingPackage()
and should not be cached for multiple apps.