Most visited

Recently visited

MediaBrowserCompat.SubscriptionCallback

public static abstract class MediaBrowserCompat.SubscriptionCallback
extends Object

java.lang.Object
   ↳ android.support.v4.media.MediaBrowserCompat.SubscriptionCallback


订阅相关事件的回调。

Summary

Public constructors

MediaBrowserCompat.SubscriptionCallback()

Public methods

void onChildrenLoaded(String parentId, List<MediaBrowserCompat.MediaItem> children)

当儿童列表被加载或更新时调用。

void onChildrenLoaded(String parentId, List<MediaBrowserCompat.MediaItem> children, Bundle options)

当儿童列表被加载或更新时调用。

void onError(String parentId)

当订阅中不存在id或其他错误时调用。

void onError(String parentId, Bundle options)

当订阅中不存在id或其他错误时调用。

Inherited methods

From class java.lang.Object

Public constructors

MediaBrowserCompat.SubscriptionCallback

MediaBrowserCompat.SubscriptionCallback ()

Public methods

onChildrenLoaded

void onChildrenLoaded (String parentId, 
                List<MediaBrowserCompat.MediaItem> children)

当儿童列表被加载或更新时调用。

Parameters
parentId String: The media id of the parent media item.
children List: The children which were loaded, or null if the id is invalid.

onChildrenLoaded

void onChildrenLoaded (String parentId, 
                List<MediaBrowserCompat.MediaItem> children, 
                Bundle options)

当儿童列表被加载或更新时调用。

Parameters
parentId String: The media id of the parent media item.
children List: The children which were loaded, or null if the id is invalid.
options Bundle: A bundle of service-specific arguments to send to the media browse service. The contents of this bundle may affect the information returned when browsing.

onError

void onError (String parentId)

当订阅中不存在id或其他错误时调用。

如果这被调用,订阅会一直保留到 unsubscribe(String)为止,因为有些错误可能会自行修复。

Parameters
parentId String: The media id of the parent media item whose children could not be loaded.

onError

void onError (String parentId, 
                Bundle options)

当订阅中不存在id或其他错误时调用。

如果这被调用,订阅会一直持续到 unsubscribe(String)为止,因为一些错误可能会自行恢复。

Parameters
parentId String: The media id of the parent media item whose children could not be loaded.
options Bundle: A bundle of service-specific arguments sent to the media browse service.

Hooray!