lightbulb_outline Please take our October 2018 developer survey. Start survey
added in version 1.0.0
belongs to Maven artifact androidx.slice:slice-core:1.0.0

Slice

public final class Slice
extends Object implements VersionedParcelable

java.lang.Object
   ↳ androidx.slice.Slice


A slice is a piece of app content and actions that can be surfaced outside of the app. A slice is identified by a Uri and served via a SliceProvider.

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

Summary

Public methods

List<String> getHints()
List<SliceItem> getItems()
Uri getUri()
String toString()

Inherited methods

Public methods

getHints

added in version 1.0.0
public List<String> getHints ()

Returns
List<String> All hints associated with this Slice.

getItems

added in version 1.0.0
public List<SliceItem> getItems ()

Returns
List<SliceItem> All child SliceItems that this Slice contains.

getUri

added in version 1.0.0
public Uri getUri ()

Returns
Uri The Uri that this Slice represents.

toString

public String toString ()

Returns
String A string representation of this slice.