mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Adapters refactoring
This commit is contained in:
parent
18fae806a6
commit
ae23d268cd
34 changed files with 341 additions and 100 deletions
|
|
@ -21,18 +21,18 @@ public class DiscoverSongAdapter extends RecyclerView.Adapter<DiscoverSongAdapte
|
|||
private static final String TAG = "DiscoverSongAdapter";
|
||||
|
||||
private List<Song> songs;
|
||||
private LayoutInflater layoutInflater;
|
||||
private LayoutInflater inflater;
|
||||
private Context context;
|
||||
|
||||
public DiscoverSongAdapter(Context context, List<Song> songs) {
|
||||
this.context = context;
|
||||
this.layoutInflater = LayoutInflater.from(context);
|
||||
this.inflater = LayoutInflater.from(context);
|
||||
this.songs = songs;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = layoutInflater.inflate(R.layout.item_home_discover_song, parent, false);
|
||||
View view = inflater.inflate(R.layout.item_home_discover_song, parent, false);
|
||||
return new ViewHolder(view);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue