Language

Slice.Builder.AddIcon(Icon, String, IList<String>) Method

Definition

Add an image to the slice being constructed

[Android.Runtime.Register("addIcon", "(Landroid/graphics/drawable/Icon;Ljava/lang/String;Ljava/util/List;)Landroid/app/slice/Slice$Builder;", "GetAddIcon_Landroid_graphics_drawable_Icon_Ljava_lang_String_Ljava_util_List_Handler", ApiSince=28)]
public virtual Android.App.Slices.Slice.Builder? AddIcon(Android.Graphics.Drawables.Icon? icon, string? subType, System.Collections.Generic.IList<string>? hints);
[<Android.Runtime.Register("addIcon", "(Landroid/graphics/drawable/Icon;Ljava/lang/String;Ljava/util/List;)Landroid/app/slice/Slice$Builder;", "GetAddIcon_Landroid_graphics_drawable_Icon_Ljava_lang_String_Ljava_util_List_Handler", ApiSince=28)>]
abstract member AddIcon : Android.Graphics.Drawables.Icon * string * System.Collections.Generic.IList<string> -> Android.App.Slices.Slice.Builder
override this.AddIcon : Android.Graphics.Drawables.Icon * string * System.Collections.Generic.IList<string> -> Android.App.Slices.Slice.Builder

Parameters

icon
Icon

The icon to store in the image item. Must not be null.

subType
String

Optional template-specific type information. This value may be null. Values include: Slice.SubtypeColor; Slice.SubtypeContentDescription; Slice.SubtypeMax; Slice.SubtypeMessage; Slice.SubtypePriority; Slice.SubtypeRange; Slice.SubtypeSource; Slice.SubtypeToggle; Slice.SubtypeValue; Slice.SubtypeLayoutDirection

hints
IList<String>

The list of hints. Hints can include: Slice.HintTitle; Slice.HintList; Slice.HintListItem; Slice.HintLarge; Slice.HintActions; Slice.HintSelected; Slice.HintNoTint; Slice.HintShortcut; Slice.HintHorizontal; Slice.HintPartial; Slice.HintSeeMore; Slice.HintKeywords; Slice.HintError; Slice.HintTtl; Slice.HintLastUpdated; Slice.HintPermissionRequest

Returns

This builder.

Attributes

Remarks

Add an image to the slice being constructed

Android reference for android.app.slice.Slice.Builder.addIcon.

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.

Applies to