Slice Class

Definition

A slice is a piece of app content and actions that can be surfaced outside of the app.

[Android.Runtime.Register("android/app/slice/Slice", ApiSince=28, DoNotGenerateAcw=true)]
public sealed class Slice : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("android/app/slice/Slice", ApiSince=28, DoNotGenerateAcw=true)>]
type Slice = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Inheritance
Slice
Attributes
Implements

Remarks

A slice is a piece of app content and actions that can be surfaced outside of the app.

They are constructed using Builder in a tree structure that provides the OS some information about how the content should be displayed.

Java documentation for android.app.slice.Slice.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Fields

ExtraRangeValue

Key to retrieve an extra added to an intent when the value of an input range is changed.

ExtraToggleState

Key to retrieve an extra added to an intent when a control is changed.

HintActions

Hint that this slice contains a number of actions that can be grouped together in a sort of controls area of the UI.

HintError

A hint to indicate that this slice represents an error.

HintHorizontal

Hint that list items within this slice or subslice would appear better if organized horizontally.

HintKeywords

A hint to indicate that the contents of this subslice represent a list of keywords related to the parent slice.

HintLarge

Hint that this content is important and should be larger when displayed if possible.

HintLastUpdated

Hint indicating an item representing when the content was created or last updated.

HintList

Hint that all sub-items/sub-slices within this content should be considered to have #HINT_LIST_ITEM.

HintListItem

Hint that this item is part of a list and should be formatted as if is part of a list.

HintNoTint

Hint to indicate that this content should not be tinted.

HintPartial

Hint to indicate that this slice is incomplete and an update will be sent once loading is complete.

HintPermissionRequest

A hint to indicate that this slice represents a permission request for showing slices.

HintSeeMore

A hint representing that this item should be used to indicate that there's more content associated with this slice.

HintSelected

Hint indicating that this item (and its sub-items) are the current selection.

HintShortcut

Hint to indicate that this content should only be displayed if the slice is presented as a shortcut.

HintSummary

Hint indicating this content should be shown instead of the normal content when the slice is in small format.

HintTitle

Hint that this content is a title of other content in the slice.

HintTtl

Hint indicating an item representing a time-to-live for the content.

SubtypeColor

Subtype to tag an item as representing a color.

SubtypeContentDescription

Subtype to tag an item to use as a content description.

SubtypeLayoutDirection

Subtype to indicate that this item indicates the layout direction for content in the slice.

SubtypeMax

Subtype to tag an item as representing the max int value for a #SUBTYPE_RANGE.

SubtypeMessage

Subtype to indicate that this is a message as part of a communication sequence in this slice.

SubtypeMillis

Subtype to tag an item as representing a time in milliseconds since midnight, January 1, 1970 UTC.

SubtypePriority

Subtype to tag an item representing priority.

SubtypeRange

Subtype to tag an item as representing a range.

SubtypeSource

Subtype to tag the source (i.

SubtypeToggle

Subtype to indicate that this content has a toggle action associated with it.

SubtypeValue

Subtype to tag an item as representing the current int value for a #SUBTYPE_RANGE.

Properties

Class

Returns the runtime class of this Object.

(Inherited from Object)
Creator
Handle

The handle to the underlying Android instance.

(Inherited from Object)
Hints
IsCallerNeeded

Returns whether the caller for this slice matters.

Items
JniIdentityHashCode (Inherited from Object)
JniPeerMembers
PeerReference (Inherited from Object)
Spec
ThresholdClass

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
ThresholdType

This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

(Inherited from Object)
Uri

Methods

Clone()

Creates and returns a copy of this object.

(Inherited from Object)
DescribeContents()
Dispose() (Inherited from Object)
Dispose(Boolean) (Inherited from Object)
Equals(Object)

Indicates whether some other object is "equal to" this one.

(Inherited from Object)
GetHashCode()

Returns a hash code value for the object.

(Inherited from Object)
JavaFinalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

(Inherited from Object)
Notify()

Wakes up a single thread that is waiting on this object's monitor.

(Inherited from Object)
NotifyAll()

Wakes up all threads that are waiting on this object's monitor.

(Inherited from Object)
SetHandle(IntPtr, JniHandleOwnership)

Sets the Handle property.

(Inherited from Object)
ToArray<T>() (Inherited from Object)
ToString()

Returns a string representation of the object.

(Inherited from Object)
UnregisterFromRuntime() (Inherited from Object)
Wait()

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>.

(Inherited from Object)
Wait(Int64, Int32)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
Wait(Int64)

Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed.

(Inherited from Object)
WriteToParcel(Parcel, ParcelableWriteFlags)

Explicit Interface Implementations

IJavaPeerable.Disposed() (Inherited from Object)
IJavaPeerable.DisposeUnlessReferenced() (Inherited from Object)
IJavaPeerable.Finalized() (Inherited from Object)
IJavaPeerable.JniManagedPeerState (Inherited from Object)
IJavaPeerable.SetJniIdentityHashCode(Int32) (Inherited from Object)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) (Inherited from Object)
IJavaPeerable.SetPeerReference(JniObjectReference) (Inherited from Object)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to