Add album page

This commit is contained in:
Antonio Cappiello 2020-11-23 09:28:20 +01:00
parent c2be2711b9
commit b2c269a051
18 changed files with 334 additions and 68 deletions

View file

@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.cappielloantonio.play.R;
import com.cappielloantonio.play.model.Album;
import com.cappielloantonio.play.model.Artist;
import com.cappielloantonio.play.util.Util;
import java.util.List;
@ -65,6 +66,10 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
}
}
public Album getItem(int position) {
return albums.get(position);
}
public void setItems(List<Album> albums) {
this.albums = albums;
notifyDataSetChanged();

View file

@ -61,6 +61,10 @@ public class AlbumArtistPageAdapter extends RecyclerView.Adapter<AlbumArtistPage
}
}
public Album getItem(int position) {
return albums.get(position);
}
public void setItems(List<Album> albums) {
this.albums = albums;
notifyDataSetChanged();

View file

@ -10,6 +10,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.cappielloantonio.play.R;
import com.cappielloantonio.play.model.Album;
import com.cappielloantonio.play.model.Artist;
import java.util.List;
@ -64,6 +65,10 @@ public class AlbumCatalogueAdapter extends RecyclerView.Adapter<AlbumCatalogueAd
}
}
public Album getItem(int position) {
return albums.get(position);
}
public void setItems(List<Album> albums) {
this.albums = albums;
notifyDataSetChanged();

View file

@ -62,6 +62,10 @@ public class ArtistAdapter extends RecyclerView.Adapter<ArtistAdapter.ViewHolder
}
}
public Artist getItem(int position) {
return artists.get(position);
}
public void setItems(List<Artist> artists) {
this.artists = artists;
notifyDataSetChanged();

View file

@ -35,6 +35,9 @@ public interface SongDao {
@Query("SELECT * FROM song WHERE play_count != 0 AND artistId = :artistID ORDER BY play_count DESC LIMIT :number")
LiveData<List<Song>> getArtistTopSongsSample(String artistID, int number);
@Query("SELECT * FROM song WHERE albumId = :albumID ORDER BY trackNumber ASC")
LiveData<List<Song>> getAlbumSong(String albumID);
@Query("SELECT EXISTS(SELECT * FROM song WHERE id = :id)")
boolean exist(String id);

View file

@ -19,6 +19,7 @@ public class SongRepository {
private LiveData<List<Song>> listLiveSampleRecentlyPlayedSongs;
private LiveData<List<Song>> listLiveSampleMostPlayedSongs;
private LiveData<List<Song>> listLiveSampleArtistTopSongs;
private LiveData<List<Song>> listLiveAlbumSongs;
public SongRepository(Application application) {
@ -51,6 +52,11 @@ public class SongRepository {
return listLiveSampleArtistTopSongs;
}
public LiveData<List<Song>> getAlbumListLiveSong(String albumID) {
listLiveAlbumSongs = songDao.getAlbumSong(albumID);
return listLiveAlbumSongs;
}
public boolean exist(Song song) {
boolean exist = false;

View file

@ -10,9 +10,11 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.GridLayoutManager;
import com.cappielloantonio.play.R;
import com.cappielloantonio.play.adapter.AlbumCatalogueAdapter;
import com.cappielloantonio.play.databinding.FragmentAlbumCatalogueBinding;
import com.cappielloantonio.play.helper.recyclerview.ItemlDecoration;
import com.cappielloantonio.play.ui.activities.MainActivity;
import com.cappielloantonio.play.viewmodel.AlbumCatalogueViewModel;
import java.util.ArrayList;
@ -21,12 +23,15 @@ public class AlbumCatalogueFragment extends Fragment {
private static final String TAG = "ArtistCatalogueFragment";
private FragmentAlbumCatalogueBinding bind;
private MainActivity activity;
private AlbumCatalogueViewModel albumCatalogueViewModel;
private AlbumCatalogueAdapter albumAdapter;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
activity = (MainActivity) getActivity();
bind = FragmentAlbumCatalogueBinding.inflate(inflater, container, false);
View view = bind.getRoot();
albumCatalogueViewModel = new ViewModelProvider(requireActivity()).get(AlbumCatalogueViewModel.class);
@ -48,7 +53,11 @@ public class AlbumCatalogueFragment extends Fragment {
bind.albumCatalogueRecyclerView.setHasFixedSize(true);
albumAdapter = new AlbumCatalogueAdapter(requireContext(), new ArrayList<>());
albumAdapter.setClickListener((view, position) -> Toast.makeText(requireContext(), "Click: " + position, Toast.LENGTH_SHORT).show());
albumAdapter.setClickListener((view, position) -> {
Bundle bundle = new Bundle();
bundle.putParcelable("album_object", albumAdapter.getItem(position));
activity.navController.navigate(R.id.action_libraryFragment_to_albumPageFragment, bundle);
});
bind.albumCatalogueRecyclerView.setAdapter(albumAdapter);
albumCatalogueViewModel.getAlbumList().observe(requireActivity(), albums -> {
bind.loadingProgressBar.setVisibility(View.GONE);

View file

@ -0,0 +1,65 @@
package com.cappielloantonio.play.ui.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager;
import com.cappielloantonio.play.adapter.AlbumArtistPageAdapter;
import com.cappielloantonio.play.adapter.SongResultSearchAdapter;
import com.cappielloantonio.play.databinding.FragmentAlbumPageBinding;
import com.cappielloantonio.play.databinding.FragmentArtistPageBinding;
import com.cappielloantonio.play.model.Album;
import com.cappielloantonio.play.ui.activities.MainActivity;
import com.cappielloantonio.play.viewmodel.AlbumPageViewModel;
import com.cappielloantonio.play.viewmodel.ArtistPageViewModel;
import java.util.ArrayList;
public class AlbumPageFragment extends Fragment {
private FragmentAlbumPageBinding bind;
private MainActivity activity;
private AlbumPageViewModel albumPageViewModel;
private SongResultSearchAdapter songResultSearchAdapter;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
activity = (MainActivity) getActivity();
bind = FragmentAlbumPageBinding.inflate(inflater, container, false);
View view = bind.getRoot();
albumPageViewModel = new ViewModelProvider(requireActivity()).get(AlbumPageViewModel.class);
init();
initSongsView();
return view;
}
@Override
public void onDestroyView() {
super.onDestroyView();
bind = null;
}
private void init() {
albumPageViewModel.setAlbum(getArguments().getParcelable("album_object"));
bind.albumTitleLabel.setText(albumPageViewModel.getAlbum().getTitle());
}
private void initSongsView() {
bind.songRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
bind.songRecyclerView.setHasFixedSize(true);
songResultSearchAdapter = new SongResultSearchAdapter(requireContext(), new ArrayList<>());
bind.songRecyclerView.setAdapter(songResultSearchAdapter);
albumPageViewModel.getAlbumSongList().observe(requireActivity(), songs -> songResultSearchAdapter.setItems(songs));
}
}

View file

@ -29,12 +29,15 @@ public class ArtistCatalogueFragment extends Fragment {
private static final String TAG = "ArtistCatalogueFragment";
private FragmentArtistCatalogueBinding bind;
private MainActivity activity;
private ArtistCatalogueViewModel artistCatalogueViewModel;
private ArtistCatalogueAdapter artistAdapter;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
activity = (MainActivity) getActivity();
bind = FragmentArtistCatalogueBinding.inflate(inflater, container, false);
View view = bind.getRoot();
artistCatalogueViewModel = new ViewModelProvider(requireActivity()).get(ArtistCatalogueViewModel.class);
@ -56,7 +59,11 @@ public class ArtistCatalogueFragment extends Fragment {
bind.artistCatalogueRecyclerView.setHasFixedSize(true);
artistAdapter = new ArtistCatalogueAdapter(requireContext(), new ArrayList<>());
artistAdapter.setClickListener((view, position) -> Toast.makeText(requireContext(), "Click: " + position, Toast.LENGTH_SHORT).show());
artistAdapter.setClickListener((view, position) -> {
Bundle bundle = new Bundle();
bundle.putParcelable("artist_object", artistAdapter.getItem(position));
activity.navController.navigate(R.id.action_artistCatalogueFragment_to_artistPageFragment, bundle);
});
bind.artistCatalogueRecyclerView.setAdapter(artistAdapter);
artistCatalogueViewModel.getArtistList().observe(requireActivity(), artists -> {
bind.loadingProgressBar.setVisibility(View.GONE);

View file

@ -31,8 +31,6 @@ public class ArtistPageFragment extends Fragment {
private SongResultSearchAdapter songResultSearchAdapter;
private AlbumArtistPageAdapter albumArtistPageAdapter;
private String artistID;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
activity = (MainActivity) getActivity();
@ -55,7 +53,9 @@ public class ArtistPageFragment extends Fragment {
}
private void init() {
artistID = getArguments().getString("artistID");
artistPageViewModel.setArtist(getArguments().getParcelable("artist_object"));
bind.artistNameLabel.setText(artistPageViewModel.getArtist().getName());
}
private void initTopSongsView() {
@ -64,7 +64,7 @@ public class ArtistPageFragment extends Fragment {
songResultSearchAdapter = new SongResultSearchAdapter(requireContext(), new ArrayList<>());
bind.mostStreamedSongRecyclerView.setAdapter(songResultSearchAdapter);
artistPageViewModel.getArtistTopSongList(artistID).observe(requireActivity(), songs -> songResultSearchAdapter.setItems(songs));
artistPageViewModel.getArtistTopSongList().observe(requireActivity(), songs -> songResultSearchAdapter.setItems(songs));
}
private void initAlbumsView() {
@ -72,7 +72,12 @@ public class ArtistPageFragment extends Fragment {
bind.albumsRecyclerView.setHasFixedSize(true);
albumArtistPageAdapter = new AlbumArtistPageAdapter(requireContext(), new ArrayList<>());
albumArtistPageAdapter.setClickListener((view, position) -> {
Bundle bundle = new Bundle();
bundle.putParcelable("album_object", albumArtistPageAdapter.getItem(position));
activity.navController.navigate(R.id.action_artistPageFragment_to_albumPageFragment, bundle);
});
bind.albumsRecyclerView.setAdapter(albumArtistPageAdapter);
artistPageViewModel.getAlbumList(artistID).observe(requireActivity(), songs -> albumArtistPageAdapter.setItems(songs));
artistPageViewModel.getAlbumList().observe(requireActivity(), songs -> albumArtistPageAdapter.setItems(songs));
}
}

View file

@ -78,7 +78,11 @@ public class LibraryFragment extends Fragment {
bind.albumRecyclerView.setHasFixedSize(true);
albumAdapter = new AlbumAdapter(requireContext(), new ArrayList<>());
albumAdapter.setClickListener((view, position) -> Toast.makeText(requireContext(), "Album: " + position, Toast.LENGTH_SHORT).show());
albumAdapter.setClickListener((view, position) -> {
Bundle bundle = new Bundle();
bundle.putParcelable("album_object", albumAdapter.getItem(position));
activity.navController.navigate(R.id.action_libraryFragment_to_albumPageFragment, bundle);
});
bind.albumRecyclerView.setAdapter(albumAdapter);
libraryViewModel.getAlbumSample().observe(requireActivity(), albums -> albumAdapter.setItems(albums));
}
@ -88,7 +92,11 @@ public class LibraryFragment extends Fragment {
bind.artistRecyclerView.setHasFixedSize(true);
artistAdapter = new ArtistAdapter(requireContext(), new ArrayList<>());
artistAdapter.setClickListener((view, position) -> Toast.makeText(requireContext(), "Artist: " + position, Toast.LENGTH_SHORT).show());
artistAdapter.setClickListener((view, position) -> {
Bundle bundle = new Bundle();
bundle.putParcelable("artist_object", artistAdapter.getItem(position));
activity.navController.navigate(R.id.action_libraryFragment_to_artistPageFragment, bundle);
});
bind.artistRecyclerView.setAdapter(artistAdapter);
libraryViewModel.getArtistSample().observe(requireActivity(), artists -> artistAdapter.setItems(artists));
}

View file

@ -99,7 +99,9 @@ public class SearchFragment extends Fragment {
albumResultSearchAdapter = new AlbumCatalogueAdapter(requireContext(), new ArrayList<>());
albumResultSearchAdapter.setClickListener((view, position) -> {
Toast.makeText(requireContext(), "Album " + position, Toast.LENGTH_SHORT).show();
Bundle bundle = new Bundle();
bundle.putParcelable("album_object", albumResultSearchAdapter.getItem(position));
activity.navController.navigate(R.id.action_searchFragment_to_albumPageFragment, bundle);
});
bind.searchResultAlbumRecyclerView.setAdapter(albumResultSearchAdapter);
@ -110,9 +112,8 @@ public class SearchFragment extends Fragment {
artistResultSearchAdapter = new ArtistCatalogueAdapter(requireContext(), new ArrayList<>());
artistResultSearchAdapter.setClickListener((view, position) -> {
Toast.makeText(requireContext(), "Artist " + position, Toast.LENGTH_SHORT).show();
Bundle bundle = new Bundle();
bundle.putString("artistID", artistResultSearchAdapter.getItem(position).id);
bundle.putParcelable("artist_object", artistResultSearchAdapter.getItem(position));
activity.navController.navigate(R.id.action_searchFragment_to_artistPageFragment, bundle);
});
bind.searchResultArtistRecyclerView.setAdapter(artistResultSearchAdapter);

View file

@ -0,0 +1,42 @@
package com.cappielloantonio.play.viewmodel;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import com.cappielloantonio.play.model.Album;
import com.cappielloantonio.play.model.Artist;
import com.cappielloantonio.play.model.Song;
import com.cappielloantonio.play.repository.AlbumRepository;
import com.cappielloantonio.play.repository.SongRepository;
import java.util.List;
public class AlbumPageViewModel extends AndroidViewModel {
private SongRepository songRepository;
private LiveData<List<Song>> songList;
private Album album;
public AlbumPageViewModel(@NonNull Application application) {
super(application);
songRepository = new SongRepository(application);
}
public LiveData<List<Song>> getAlbumSongList() {
songList = songRepository.getAlbumListLiveSong(album.getId());
return songList;
}
public Album getAlbum() {
return album;
}
public void setAlbum(Album album) {
this.album = album;
}
}

View file

@ -7,6 +7,7 @@ import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import com.cappielloantonio.play.model.Album;
import com.cappielloantonio.play.model.Artist;
import com.cappielloantonio.play.model.Song;
import com.cappielloantonio.play.repository.AlbumRepository;
import com.cappielloantonio.play.repository.SongRepository;
@ -20,6 +21,8 @@ public class ArtistPageViewModel extends AndroidViewModel {
private LiveData<List<Song>> songList;
private LiveData<List<Album>> albumList;
private Artist artist;
public ArtistPageViewModel(@NonNull Application application) {
super(application);
@ -27,13 +30,21 @@ public class ArtistPageViewModel extends AndroidViewModel {
albumRepository = new AlbumRepository(application);
}
public LiveData<List<Album>> getAlbumList(String artistID) {
albumList = albumRepository.getArtistListLiveAlbums(artistID);
public LiveData<List<Album>> getAlbumList() {
albumList = albumRepository.getArtistListLiveAlbums(artist.id);
return albumList;
}
public LiveData<List<Song>> getArtistTopSongList(String artistID) {
songList = songRepository.getArtistListLiveTopSong(artistID);
public LiveData<List<Song>> getArtistTopSongList() {
songList = songRepository.getArtistListLiveTopSong(artist.id);
return songList;
}
public Artist getArtist() {
return artist;
}
public void setArtist(Artist artist) {
this.artist = artist;
}
}

View file

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="0dp"
android:layout_height="0dp"
android:backgroundTint="@color/cardColor"
app:layout_constraintDimensionRatio="W, 4:5"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/album_title_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/open_sans_font_family"
android:textColor="@color/titleTextColor"
android:textSize="40sp"
android:textStyle="bold"
android:textAlignment="center"
android:textFontWeight="900"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:paddingBottom="32dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
<!-- Label and button -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/open_sans_font_family"
android:paddingStart="16dp"
android:paddingTop="20dp"
android:paddingEnd="16dp"
android:text="Song"
android:textColor="@color/titleTextColor"
android:textSize="22sp"
android:textStyle="bold" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/song_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:clipToPadding="false"
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingBottom="54dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -29,14 +29,17 @@
android:layout_height="match_parent">
<TextView
android:id="@+id/artist_name_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/open_sans_font_family"
android:text="Green Day"
android:textColor="@color/titleTextColor"
android:textSize="40sp"
android:textStyle="bold"
android:textAlignment="center"
android:textFontWeight="900"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:paddingBottom="32dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
@ -115,6 +118,6 @@
android:paddingStart="16dp"
android:paddingTop="8dp"
android:paddingEnd="8dp"
android:paddingBottom="8dp" />
android:paddingBottom="54dp" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View file

@ -1,19 +1,18 @@
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:paddingEnd="4dp">
android:paddingEnd="4dp"
android:paddingBottom="2dp">
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:id="@+id/imageView"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_margin="2dp"
android:layout_gravity="center"
android:layout_margin="2dp"
android:backgroundTint="@color/cardColor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -22,36 +21,41 @@
card_view:cardCornerRadius="4dp"
card_view:cardElevation="2dp"
card_view:cardPreventCornerOverlap="false"
card_view:cardUseCompatPadding="false"/>
card_view:cardUseCompatPadding="false" />
<TextView
android:id="@+id/search_result_song_title_text_view"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/open_sans_font_family"
android:paddingStart="12dp"
android:paddingTop="4dp"
android:text="@string/label_placeholder"
android:textColor="@color/titleTextColor"
android:textSize="14sp"
android:textStyle="bold"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/search_result_song_artist_text_view"/>
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_weight="1">
<TextView
android:id="@+id/search_result_song_artist_text_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/open_sans_font_family"
android:paddingStart="12dp"
android:paddingBottom="4dp"
android:text="@string/label_placeholder"
android:textColor="@color/subtitleTextColor"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/imageView"
app:layout_constraintTop_toBottomOf="@+id/search_result_song_title_text_view" />
<TextView
android:id="@+id/search_result_song_title_text_view"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:ellipsize="end"
android:fontFamily="@font/open_sans_font_family"
android:maxLines="1"
android:paddingStart="12dp"
android:paddingTop="8dp"
android:paddingEnd="12dp"
android:text="@string/label_placeholder"
android:textColor="@color/titleTextColor"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/search_result_song_artist_text_view"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:fontFamily="@font/open_sans_font_family"
android:paddingStart="12dp"
android:text="@string/label_placeholder"
android:textColor="@color/subtitleTextColor"
android:textSize="12sp" />
</LinearLayout>
<TextView
android:id="@+id/search_result_song_duration_text_view"
@ -60,10 +64,11 @@
android:fontFamily="@font/open_sans_font_family"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:gravity="center_vertical"
android:text="@string/label_placeholder"
android:textColor="@color/subtitleTextColor"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>

View file

@ -83,11 +83,10 @@
app:destination="@id/genreCatalogueFragment" />
<action
android:id="@+id/action_libraryFragment_to_artistPageFragment"
app:destination="@id/artistPageFragment">
<argument
android:name="artistID"
app:argType="string"/>
</action>
app:destination="@id/artistPageFragment"/>
<action
android:id="@+id/action_libraryFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
</fragment>
<fragment
android:id="@+id/settingsFragment"
@ -104,11 +103,10 @@
app:destination="@id/filterFragment" />
<action
android:id="@+id/action_searchFragment_to_artistPageFragment"
app:destination="@id/artistPageFragment">
<argument
android:name="artistID"
app:argType="string"/>
</action>
app:destination="@id/artistPageFragment"/>
<action
android:id="@+id/action_searchFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
</fragment>
<fragment
android:id="@+id/filterFragment"
@ -122,17 +120,17 @@
tools:layout="@layout/fragment_artist_catalogue">
<action
android:id="@+id/action_artistCatalogueFragment_to_artistPageFragment"
app:destination="@id/artistPageFragment">
<argument
android:name="artistID"
app:argType="string"/>
</action>
app:destination="@id/artistPageFragment"/>
</fragment>
<fragment
android:id="@+id/albumCatalogueFragment"
android:name="com.cappielloantonio.play.ui.fragment.AlbumCatalogueFragment"
android:label="AlbumCatalogueFragment"
tools:layout="@layout/fragment_album_catalogue"/>
tools:layout="@layout/fragment_album_catalogue">
<action
android:id="@+id/action_albumCatalogueFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
</fragment>
<fragment
android:id="@+id/genreCatalogueFragment"
android:name="com.cappielloantonio.play.ui.fragment.GenreCatalogueFragment"
@ -143,5 +141,14 @@
android:id="@+id/artistPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.ArtistPageFragment"
android:label="ArtistPageFragment"
tools:layout="@layout/fragment_artist_page"/>
tools:layout="@layout/fragment_artist_page">
<action
android:id="@+id/action_artistPageFragment_to_albumPageFragment"
app:destination="@id/albumPageFragment" />
</fragment>
<fragment
android:id="@+id/albumPageFragment"
android:name="com.cappielloantonio.play.ui.fragment.AlbumPageFragment"
android:label="AlbumPageFragment"
tools:layout="@layout/fragment_album_page"/>
</navigation>