public static final class PlaybackStateCompat.CustomAction.Builder
extends Object
| java.lang.Object | |
| android.support.v4.media.session.PlaybackStateCompat.CustomAction.Builder | |
为 PlaybackStateCompat.CustomAction对象 PlaybackStateCompat.CustomAction对象。
Public constructors |
|
|---|---|
PlaybackStateCompat.CustomAction.Builder(String action, CharSequence name, int icon) 使用ID,名称和图标集创建 |
|
公共方法(Public methods) |
|
|---|---|
PlaybackStateCompat.CustomAction |
build() 使用指定的值构建并返回 |
PlaybackStateCompat.CustomAction.Builder |
setExtras(Bundle extras) 为 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
PlaybackStateCompat.CustomAction.Builder (String action, CharSequence name, int icon)
使用ID,名称和图标集创建 PlaybackStateCompat.CustomAction构建器。
| 参数(Parameters) | |
|---|---|
action |
String: The action of the PlaybackStateCompat.CustomAction. |
name |
CharSequence: The display name of the PlaybackStateCompat.CustomAction. This name will be displayed along side the action if the UI supports it. |
icon |
int: The icon resource id of the PlaybackStateCompat.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. |
PlaybackStateCompat.CustomAction build ()
使用指定的值构建并返回 PlaybackStateCompat.CustomAction实例。
| 返回(Returns) | |
|---|---|
PlaybackStateCompat.CustomAction |
A new PlaybackStateCompat.CustomAction instance. |
PlaybackStateCompat.CustomAction.Builder setExtras (Bundle extras)
为PlaybackStateCompat.CustomAction设置可选附加PlaybackStateCompat.CustomAction 。 如果知道如何处理它们,这些附加信息将被MediaControllerCompat使用。 密钥应完全限定(例如“com.example.MY_ARG”)以避免冲突。
| 参数(Parameters) | |
|---|---|
extras |
Bundle: Optional extras for the PlaybackStateCompat.CustomAction. |
| 返回(Returns) | |
|---|---|
PlaybackStateCompat.CustomAction.Builder |
this. |