public class

SliceSpecs

extends java.lang.Object

 java.lang.Object

↳androidx.slice.SliceSpecs

Gradle dependencies

compile group: 'androidx.slice', name: 'slice-core', version: '1.1.0-alpha02'

  • groupId: androidx.slice
  • artifactId: slice-core
  • version: 1.1.0-alpha02

Artifact androidx.slice:slice-core:1.1.0-alpha02 it located at Google repository (https://maven.google.com/)

Androidx artifact mapping:

androidx.slice:slice-core com.android.support:slices-core

Overview

Constants for each of the slice specs

Summary

Fields
public static final SliceSpecBASIC

Most basic slice, only has icon, title, and summary.

public static final SliceSpecLIST

List of rows, each row has start/end items, title, summary.

public static final SliceSpecLIST_V2

Same as LIST, but also supports selection rows.

public static final SliceSpecMESSAGING

Messaging template.

Methods
from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public static final SliceSpec BASIC

Most basic slice, only has icon, title, and summary.

public static final SliceSpec LIST

List of rows, each row has start/end items, title, summary. Also supports grid rows.

public static final SliceSpec LIST_V2

Same as LIST, but also supports selection rows.

public static final SliceSpec MESSAGING

Messaging template. Each message contains a timestamp and a message, it optionally contains a source of where the message came from.

Source

/*
 * Copyright 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package androidx.slice;

import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;

/**
 * Constants for each of the slice specs
 * @hide
 */
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP_PREFIX)
@RequiresApi(19)
public class SliceSpecs {

    /**
     * Most basic slice, only has icon, title, and summary.
     */
    public static final SliceSpec BASIC = new SliceSpec("androidx.slice.BASIC", 1);

    /**
     * List of rows, each row has start/end items, title, summary.
     * Also supports grid rows.
     */
    public static final SliceSpec LIST = new SliceSpec("androidx.slice.LIST", 1);

    /**
     * Same as LIST, but also supports selection rows.
     */
    public static final SliceSpec LIST_V2 = new SliceSpec("androidx.slice.LIST", 2);

    /**
     * Messaging template. Each message contains a timestamp and a message, it optionally contains
     * a source of where the message came from.
     */
    public static final SliceSpec MESSAGING = new SliceSpec("androidx.slice.MESSAGING", 1);

    private SliceSpecs() {
    }
}