Callback interface for receiving updates from MediaQueue
.
All the methods will be called on the main thread.
Public Constructor Summary
Callback()
|
Public Method Summary
void |
itemsInsertedInRange(int insertIndex, int insertCount)
Called when a contiguous range of queue items have been inserted into the
queue.
|
void |
itemsReloaded()
Called when the queue has been entirely reloaded.
|
void |
itemsRemovedAtIndexes(int[] indexes)
Called when one or more queue items have been removed from the queue.
|
void |
itemsReorderedAtIndexes(List<Integer>
indexes, int insertBeforeIndex)
Called when one or more queue items have been reordered in the queue.
|
void |
itemsUpdatedAtIndexes(int[] indexes)
Called when one or more queue items have been updated in the queue.
|
void |
mediaQueueChanged()
Called when one or more changes have been made to the queue.
|
void |
mediaQueueWillChange()
Called when one or more changes are about to be made to the queue.
|
Inherited Method Summary
Public Constructors
public Callback ()
Public Methods
public void itemsInsertedInRange (int insertIndex, int insertCount)
Called when a contiguous range of queue items have been inserted into the queue.
Parameters
insertIndex | the index where the items are inserted |
---|---|
insertCount | the number of items inserted |
public void itemsReloaded ()
Called when the queue has been entirely reloaded. Any previously accessed queue items should be considered invalid.
public void itemsRemovedAtIndexes (int[] indexes)
Called when one or more queue items have been removed from the queue.
Parameters
indexes | the ordered list of indexes of items that have been removed |
---|
public void itemsReorderedAtIndexes (List<Integer> indexes, int insertBeforeIndex)
Called when one or more queue items have been reordered in the queue. For example,
indexes
of [2, 1, 5]
and insertBeforeIndex
of
3
means that the original queue of [1, 2, 3, 4, 5, 6]
now
looks like [3, 2, 1, 5, 4 ,6]
.
Parameters
indexes | the list of indexes of items that have been reordered. |
---|---|
insertBeforeIndex | the index where the reordered items are inserted |
public void itemsUpdatedAtIndexes (int[] indexes)
Called when one or more queue items have been updated in the queue. This includes the case where previously accessed but unavailable items have been retrieved and placed in the cache, and the case where previously cached items have been flushed from the cache.
public void mediaQueueChanged ()
Called when one or more changes have been made to the queue.
public void mediaQueueWillChange ()
Called when one or more changes are about to be made to the queue.