AI-generated Key Takeaways
-
MediaQueueRecyclerViewAdapteris aRecyclerView.Adapterdesigned for displaying media queues using aMediaQueueas the data source. -
You can create an instance of this adapter by providing a
MediaQueueobject to its constructor. -
The adapter provides methods to retrieve
MediaQueueItemat 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 theMediaQueue.
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)
Creates a
MediaQueueRecyclerViewAdapter.
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.