mirror of
https://github.com/gabehf/tempus.git
synced 2026-03-08 23:18:17 -07:00
Adapters refactoring
This commit is contained in:
parent
18fae806a6
commit
ae23d268cd
34 changed files with 341 additions and 100 deletions
|
|
@ -23,14 +23,14 @@ import java.util.List;
|
|||
*/
|
||||
public class SongResultSearchAdapter extends RecyclerView.Adapter<SongResultSearchAdapter.ViewHolder> {
|
||||
private static final String TAG = "SongResultSearchAdapter";
|
||||
|
||||
private List<Song> songs;
|
||||
private LayoutInflater mInflater;
|
||||
private Context context;
|
||||
|
||||
public SongResultSearchAdapter(Context context, List<Song> songs) {
|
||||
public SongResultSearchAdapter(Context context) {
|
||||
this.context = context;
|
||||
this.mInflater = LayoutInflater.from(context);
|
||||
this.songs = songs;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -48,7 +48,7 @@ public class SongResultSearchAdapter extends RecyclerView.Adapter<SongResultSear
|
|||
holder.songDuration.setText(Util.getReadableDurationString(song.getDuration()));
|
||||
|
||||
CustomGlideRequest.Builder
|
||||
.from(context, song.getPrimary(), song.getPrimary(), CustomGlideRequest.PRIMARY, CustomGlideRequest.TOP_QUALITY)
|
||||
.from(context, song.getPrimary(), song.getBlurHash(), CustomGlideRequest.PRIMARY, CustomGlideRequest.TOP_QUALITY)
|
||||
.build()
|
||||
.into(holder.cover);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue