Builder

class Builder
kotlin.Any
   ↳ android.support.v4.media.session.PlaybackStateCompat.CustomAction.Builder

Builder for CustomAction objects.

Summary

Public constructors

<init>(action: String!, name: CharSequence!, icon: Int)

Creates a CustomAction builder with the id, name, and icon set.

Public methods

PlaybackStateCompat.CustomAction!

Build and return the CustomAction instance with the specified values.

PlaybackStateCompat.CustomAction.Builder!
setExtras(extras: Bundle!)

Set optional extras for the CustomAction.

Public constructors

<init>

Builder(action: String!, name: CharSequence!, icon: Int)

Creates a CustomAction builder with the id, name, and icon set.

Parameters
action String!: The action of the CustomAction.
name String!: The display name of the CustomAction. This name will be displayed along side the action if the UI supports it.
icon String!: The icon resource id of the CustomAction. This resource id must be in the same package as the MediaSessionCompat. It will be displayed with the custom action if the UI supports it.

Public methods

build

fun build(): PlaybackStateCompat.CustomAction!

Build and return the CustomAction instance with the specified values.

Return
PlaybackStateCompat.CustomAction!: A new CustomAction instance.

setExtras

fun setExtras(extras: Bundle!): PlaybackStateCompat.CustomAction.Builder!

Set optional extras for the CustomAction. These extras are meant to be consumed by a MediaControllerCompat if it knows how to handle them. Keys should be fully qualified (e.g. "com.example.MY_ARG") to avoid collisions.

Parameters
extras Bundle!: Optional extras for the CustomAction.
Return
PlaybackStateCompat.CustomAction.Builder!: this.