Most visited

Recently visited

Added in API level 21

PlaybackState.CustomAction.Builder

public static final class PlaybackState.CustomAction.Builder
extends Object

java.lang.Object
   ↳ android.media.session.PlaybackState.CustomAction.Builder


PlaybackState.CustomAction对象的生成器。

Summary

Public constructors

PlaybackState.CustomAction.Builder(String action, CharSequence name, int icon)

使用ID,名称和图标集创建 PlaybackState.CustomAction构建器。

Public methods

PlaybackState.CustomAction build()

使用指定的值构建并返回 PlaybackState.CustomAction实例。

PlaybackState.CustomAction.Builder setExtras(Bundle extras)

PlaybackState.CustomAction设置可选附加 PlaybackState.CustomAction

Inherited methods

From class java.lang.Object

Public constructors

PlaybackState.CustomAction.Builder

Added in API level 21
PlaybackState.CustomAction.Builder (String action, 
                CharSequence name, 
                int icon)

使用ID,名称和图标集创建 PlaybackState.CustomAction构建器。

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

Public methods

build

Added in API level 21
PlaybackState.CustomAction build ()

用指定的值构建并返回 PlaybackState.CustomAction实例。

Returns
PlaybackState.CustomAction A new PlaybackState.CustomAction instance.

setExtras

Added in API level 21
PlaybackState.CustomAction.Builder setExtras (Bundle extras)

PlaybackState.CustomAction设置可选附加PlaybackState.CustomAction 如果它知道如何处理它们,这些附加信息将被MediaController消耗。 密钥应完全限定(例如“com.example.MY_ARG”)以避免冲突。

Parameters
extras Bundle: Optional extras for the PlaybackState.CustomAction.
Returns
PlaybackState.CustomAction.Builder this.

Hooray!