|
YAACC - UPNP Client and Server
|
The playlist of a player in the order it plays: with shuffle the play order (the stored list is not touched), otherwise the list order. More...


Classes | |
| class | ViewHolder |
Public Member Functions | |
| PlaylistItemAdapter (Context ctx, RecyclerView listView, Player player) | |
| void | refresh (boolean stateChanged) |
| Shows the playlist as the player has it now (after a change of the list, the order or the play mode). | |
| int | getItemCount () |
| PlayableItem | getItem (int position) |
| long | getItemId (int position) |
| PlaylistItemAdapter.ViewHolder | onCreateViewHolder (ViewGroup parent, int viewType) |
| void | onBindViewHolder (final PlaylistItemAdapter.ViewHolder holder, final int position) |
| boolean | moveItem (int fromPosition, int toPosition) |
| Moves the item at a displayed position to another one: with shuffle in the play order, otherwise in the list (the player decides which, and refuses locked positions). | |
The playlist of a player in the order it plays: with shuffle the play order (the stored list is not touched), otherwise the list order.
A row is a position of Player#getPlayOrder(); the item in it is items.get(order[position]). The adapter keeps a snapshot of both and reads the player again in refresh; edits go to the player, which decides (locked positions) and fires the change.
| PlayableItem de.yaacc.player.PlaylistItemAdapter.getItem | ( | int | position | ) |
| boolean de.yaacc.player.PlaylistItemAdapter.moveItem | ( | int | fromPosition, |
| int | toPosition ) |
Moves the item at a displayed position to another one: with shuffle in the play order, otherwise in the list (the player decides which, and refuses locked positions).

| void de.yaacc.player.PlaylistItemAdapter.refresh | ( | boolean | stateChanged | ) |
Shows the playlist as the player has it now (after a change of the list, the order or the play mode).
Nothing happens if the player has the playlist as it is shown. Main thread.
| stateChanged | true if the current item or the playing state changed too: the rows are bound again (bold marker, lock) even if the playlist is the same |