Ejemplo n.º 1
0
  public void getAllViews() {
    songList = (RecyclerView) view.findViewById(R.id.songList);

    songList.setHasFixedSize(true);
    LinearLayoutManager linearLayout =
        new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
    songList.setLayoutManager(linearLayout);
    getSongList();
    if (!MusicPlayerHelper.getInstance().getMusicStartedOnce()) {
      SlidingPanel.getInstance().setSongToLastPlayed();
    } else {
      SlidingPanel.getInstance().setPlayerControl();
    }
  }
Ejemplo n.º 2
0
 /** Gets list of all songs and sets it in the adapter. */
 private void getSongList() {
   MusicPlayerHelper.getInstance().getSongList(getActivity());
   mAdapter = new SongAdapter(getActivity());
   songList.setAdapter(mAdapter);
 }