Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. private void initRecyclerView() {
  2. Main.musicList = Main.songs.songs;
  3. if ((Main.musicList != null) && (!Main.musicList.isEmpty())) {
  4. // Connects the song list to an adapter
  5. // (Creates several Layouts from the song list)
  6. allSongsAdapter = new AllSongsAdapter(getActivity(), Main.musicList);
  7.  
  8. final LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
  9.  
  10. recyclerViewSongs.setLayoutManager(linearLayoutManager);
  11. recyclerViewSongs.setHasFixedSize(true);
  12. recyclerViewSongs.setAdapter(allSongsAdapter);
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement