Imports optimization and entries rearranged

This commit is contained in:
CappielloAntonio 2021-04-27 11:01:02 +02:00
parent 3c2837e096
commit 65e47f61ef
63 changed files with 987 additions and 1087 deletions

View file

@ -15,9 +15,9 @@ import androidx.recyclerview.widget.RecyclerView;
import com.cappielloantonio.play.App;
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.repository.QueueRepository;
import com.cappielloantonio.play.service.MusicPlayerRemote;
import com.cappielloantonio.play.ui.activity.MainActivity;
import com.cappielloantonio.play.util.MusicUtil;
@ -75,6 +75,15 @@ public class SongResultSearchAdapter extends RecyclerView.Adapter<SongResultSear
return songs.size();
}
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, View.OnLongClickListener {
TextView songTitle;
TextView songArtist;
@ -127,13 +136,4 @@ public class SongResultSearchAdapter extends RecyclerView.Adapter<SongResultSear
}
}
public void setItems(List<Song> songs) {
this.songs = songs;
notifyDataSetChanged();
}
public Song getItem(int id) {
return songs.get(id);
}
}