use of com.naman14.timber.widgets.DividerItemDecoration in project Timber by naman14.
the class PlaylistFragment method setItemDecoration.
private void setItemDecoration() {
if (isGrid) {
int spacingInPixels = getActivity().getResources().getDimensionPixelSize(R.dimen.spacing_card_album_grid);
itemDecoration = new SpacesItemDecoration(spacingInPixels);
} else {
itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST);
}
recyclerView.addItemDecoration(itemDecoration);
}
use of com.naman14.timber.widgets.DividerItemDecoration in project Timber by naman14.
the class AlbumFragment method setItemDecoration.
private void setItemDecoration() {
if (isGrid) {
int spacingInPixels = getActivity().getResources().getDimensionPixelSize(R.dimen.spacing_card_album_grid);
itemDecoration = new SpacesItemDecoration(spacingInPixels);
} else {
itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST);
}
recyclerView.addItemDecoration(itemDecoration);
}
use of com.naman14.timber.widgets.DividerItemDecoration in project Timber by naman14.
the class ArtistFragment method setItemDecoration.
private void setItemDecoration() {
if (isGrid) {
int spacingInPixels = getActivity().getResources().getDimensionPixelSize(R.dimen.spacing_card_album_grid);
itemDecoration = new SpacesItemDecoration(spacingInPixels);
} else {
itemDecoration = new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST);
}
recyclerView.addItemDecoration(itemDecoration);
}
use of com.naman14.timber.widgets.DividerItemDecoration 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);
}
use of com.naman14.timber.widgets.DividerItemDecoration in project Timber by naman14.
the class AlbumDetailFragment method setUpAlbumSongs.
private void setUpAlbumSongs() {
List<Song> songList = AlbumSongLoader.getSongsForAlbum(getActivity(), albumID);
mAdapter = new AlbumSongsAdapter(getActivity(), songList, albumID);
recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
recyclerView.setAdapter(mAdapter);
}
Aggregations