mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 17:43:32 +00:00
Add cover image and backdrop integration
This commit is contained in:
parent
6c26c6d889
commit
a0f417fa94
50 changed files with 385 additions and 204 deletions
|
|
@ -4,12 +4,14 @@ import android.content.Context;
|
|||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
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.model.Song;
|
||||
import com.cappielloantonio.play.repository.SongRepository;
|
||||
|
||||
|
|
@ -40,6 +42,11 @@ public class DiscoverSongAdapter extends RecyclerView.Adapter<DiscoverSongAdapte
|
|||
|
||||
holder.textTitle.setText(song.getTitle());
|
||||
holder.textAlbum.setText(song.getAlbumName());
|
||||
|
||||
CustomGlideRequest.Builder
|
||||
.from(context, song.getPrimary(), song.getPrimary(), CustomGlideRequest.PRIMARY)
|
||||
.build()
|
||||
.into(holder.cover);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -50,12 +57,14 @@ public class DiscoverSongAdapter extends RecyclerView.Adapter<DiscoverSongAdapte
|
|||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||
TextView textTitle;
|
||||
TextView textAlbum;
|
||||
ImageView cover;
|
||||
|
||||
ViewHolder(View itemView) {
|
||||
super(itemView);
|
||||
|
||||
textTitle = itemView.findViewById(R.id.title_discover_song_label);
|
||||
textAlbum = itemView.findViewById(R.id.album_discover_song_label);
|
||||
cover = itemView.findViewById(R.id.discover_song_cover_image_view);
|
||||
|
||||
itemView.setOnClickListener(this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue