MediaQueueRecyclerViewAdapter

  • MediaQueueRecyclerViewAdapter is a RecyclerView.Adapter designed for displaying media queues using a MediaQueue as the data source.

  • You can create an instance of this adapter by providing a MediaQueue object to its constructor.

  • The adapter provides methods to retrieve MediaQueueItem at a specific position and the total number of items in the queue.

  • Call the dispose() method when the adapter is no longer needed to stop it from receiving updates from the MediaQueue.

public abstract class MediaQueueRecyclerViewAdapter extends Adapter<VH extends RecyclerView.ViewHolder>

A RecyclerView.Adapter for media queue using MediaQueue as backend. The adapter can be used to provide views for a RecyclerView.

Public Constructor Summary

Public Method Summary

void
dispose()
Disposes the adapter so it no longer receives update from MediaQueue.
MediaQueueItem
getItem(int position)
Returns the MediaQueueItem at a given position in the queue.
int
long
getItemId(int position)
MediaQueue
getMediaQueue()
Returns the MediaQueue backing this adapter.

Inherited Method Summary

Public Constructors

public MediaQueueRecyclerViewAdapter (MediaQueue mediaQueue)

Parameters
mediaQueue the MediaQueue object backing this adapter

Public Methods

public void dispose ()

Disposes the adapter so it no longer receives update from MediaQueue.

public MediaQueueItem getItem (int position)

Returns the MediaQueueItem at a given position in the queue.

public int getItemCount ()

public long getItemId (int position)

public MediaQueue getMediaQueue ()

Returns the MediaQueue backing this adapter.