mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Imports optimization and entries rearranged
This commit is contained in:
parent
3c2837e096
commit
65e47f61ef
63 changed files with 987 additions and 1087 deletions
|
|
@ -11,8 +11,8 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
|
||||
import com.cappielloantonio.play.R;
|
||||
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||
import com.cappielloantonio.play.service.MusicPlayerRemote;
|
||||
import com.cappielloantonio.play.model.Song;
|
||||
import com.cappielloantonio.play.service.MusicPlayerRemote;
|
||||
import com.cappielloantonio.play.ui.fragment.PlayerBottomSheetFragment;
|
||||
import com.cappielloantonio.play.util.MusicUtil;
|
||||
|
||||
|
|
@ -56,7 +56,7 @@ public class PlayerSongQueueAdapter extends RecyclerView.Adapter<PlayerSongQueue
|
|||
.build()
|
||||
.into(holder.cover);
|
||||
|
||||
if(position < MusicPlayerRemote.getPosition()) {
|
||||
if (position < MusicPlayerRemote.getPosition()) {
|
||||
holder.songTitle.setTextColor(context.getResources().getColor(R.color.songToPlayTextColor, null));
|
||||
holder.songArtist.setTextColor(context.getResources().getColor(R.color.songToPlayTextColor, null));
|
||||
holder.songDuration.setTextColor(context.getResources().getColor(R.color.songToPlayTextColor, null));
|
||||
|
|
@ -68,6 +68,19 @@ public class PlayerSongQueueAdapter extends RecyclerView.Adapter<PlayerSongQueue
|
|||
return songs.size();
|
||||
}
|
||||
|
||||
public List<Song> getItems() {
|
||||
return this.songs;
|
||||
}
|
||||
|
||||
public void setItems(List<Song> songs) {
|
||||
this.songs = songs;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public Song getItem(int id) {
|
||||
return songs.get(id);
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
TextView songTitle;
|
||||
TextView songArtist;
|
||||
|
|
@ -93,17 +106,4 @@ public class PlayerSongQueueAdapter extends RecyclerView.Adapter<PlayerSongQueue
|
|||
MusicPlayerRemote.openQueue(songs, getBindingAdapterPosition(), true);
|
||||
}
|
||||
}
|
||||
|
||||
public void setItems(List<Song> songs) {
|
||||
this.songs = songs;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public List<Song> getItems() {
|
||||
return this.songs;
|
||||
}
|
||||
|
||||
public Song getItem(int id) {
|
||||
return songs.get(id);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue