Control.StatefulBuilder


public static final class Control.StatefulBuilder
extends Object

java.lang.Object
   ↳ android.service.controls.Control.StatefulBuilder


Builder class for Control that contains state information. State information is passed through an instance of a ControlTemplate and will determine how the user can interact with the Control. User interactions will be sent through the method call ControlsProviderService.performControlAction with an instance of ControlAction to convey any potential new value. Must be used to provide controls for ControlsProviderService.createPublisherFor. It provides the following defaults for non-optional parameters:

Summary

Public constructors

StatefulBuilder(Control control)

Creates a StatelessBuilder using an existing Control as a base.

StatefulBuilder(String controlId, PendingIntent appIntent)

Public methods

Control build()
Control.StatefulBuilder setAppIntent(PendingIntent appIntent)
Control.StatefulBuilder setAuthRequired(boolean authRequired)
Control.StatefulBuilder setControlId(String controlId)
Control.StatefulBuilder setControlTemplate(ControlTemplate controlTemplate)

Set the ControlTemplate to define the primary user interaction Devices may support a variety of user interactions, and all interactions cannot be represented with a single ControlTemplate.

Control.StatefulBuilder setCustomColor(ColorStateList customColor)

Optional color to be shown with the Control.

Control.StatefulBuilder