Improve search

This commit is contained in:
Antonio Cappiello 2020-11-25 15:12:07 +01:00
parent 4848d4f3d0
commit 6c26c6d889
17 changed files with 243 additions and 69 deletions

View file

@ -10,10 +10,8 @@ import androidx.recyclerview.widget.RecyclerView;
import com.cappielloantonio.play.App;
import com.cappielloantonio.play.R;
import com.cappielloantonio.play.model.Artist;
import com.cappielloantonio.play.model.Song;
import com.cappielloantonio.play.repository.SongRepository;
import com.cappielloantonio.play.util.Util;
import java.util.List;
@ -43,7 +41,7 @@ public class RecentMusicAdapter extends RecyclerView.Adapter<RecentMusicAdapter.
Song song = songs.get(position);
holder.textTitle.setText(song.getTitle());
holder.textArtist.setText(song.getAlbumName());
holder.textAlbum.setText(song.getAlbumName());
}
@Override
@ -53,13 +51,13 @@ public class RecentMusicAdapter extends RecyclerView.Adapter<RecentMusicAdapter.
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
TextView textTitle;
TextView textArtist;
TextView textAlbum;
ViewHolder(View itemView) {
super(itemView);
textTitle = itemView.findViewById(R.id.title_track_label);
textArtist = itemView.findViewById(R.id.artist_track_label);
textAlbum = itemView.findViewById(R.id.album_track_label);
itemView.setOnClickListener(this);
}