use of com.naman14.timber.adapters.ArtistSongAdapter in project Timber by naman14.
the class ArtistMusicFragment method setUpSongs.
private void setUpSongs() {
songsRecyclerview.setLayoutManager(new LinearLayoutManager(getActivity()));
ArrayList<Song> songList;
songList = ArtistSongLoader.getSongsForArtist(getActivity(), artistID);
// adding one dummy song to top of arraylist
//there will be albums header at this position in recyclerview
songList.add(0, new Song(-1, -1, -1, "dummy", "dummy", "dummy", -1, -1));
mSongAdapter = new ArtistSongAdapter(getActivity(), songList, artistID);
songsRecyclerview.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
songsRecyclerview.setAdapter(mSongAdapter);
}
Aggregations