mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 09:33:33 +00:00
Changed navigation in nav_graph for albumPageFragment
This commit is contained in:
parent
7d17916a5e
commit
26440c0e21
2 changed files with 10 additions and 3 deletions
|
|
@ -138,7 +138,7 @@ public class AlbumPageFragment extends Fragment {
|
||||||
if(artist != null) {
|
if(artist != null) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putParcelable("artist_object", artist);
|
bundle.putParcelable("artist_object", artist);
|
||||||
activity.navController.navigate(R.id.artistPageFragment, bundle);
|
activity.navController.navigate(R.id.action_albumPageFragment_to_artistPageFragment, bundle);
|
||||||
}
|
}
|
||||||
else Toast.makeText(requireContext(), "Error retrieving artist", Toast.LENGTH_SHORT).show();
|
else Toast.makeText(requireContext(), "Error retrieving artist", Toast.LENGTH_SHORT).show();
|
||||||
});
|
});
|
||||||
|
|
@ -147,7 +147,7 @@ public class AlbumPageFragment extends Fragment {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString(Song.BY_YEAR, Song.BY_YEAR);
|
bundle.putString(Song.BY_YEAR, Song.BY_YEAR);
|
||||||
bundle.putInt("year_object", albumPageViewModel.getAlbum().getYear());
|
bundle.putInt("year_object", albumPageViewModel.getAlbum().getYear());
|
||||||
activity.navController.navigate(R.id.songListPageFragment, bundle);
|
activity.navController.navigate(R.id.action_albumPageFragment_to_songListPageFragment, bundle);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -204,7 +204,14 @@
|
||||||
android:id="@+id/albumPageFragment"
|
android:id="@+id/albumPageFragment"
|
||||||
android:name="com.cappielloantonio.play.ui.fragment.AlbumPageFragment"
|
android:name="com.cappielloantonio.play.ui.fragment.AlbumPageFragment"
|
||||||
android:label="AlbumPageFragment"
|
android:label="AlbumPageFragment"
|
||||||
tools:layout="@layout/fragment_album_page" />
|
tools:layout="@layout/fragment_album_page">
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_albumPageFragment_to_artistPageFragment"
|
||||||
|
app:destination="@id/artistPageFragment" />
|
||||||
|
<action
|
||||||
|
android:id="@+id/action_albumPageFragment_to_songListPageFragment"
|
||||||
|
app:destination="@id/songListPageFragment" />
|
||||||
|
</fragment>
|
||||||
<fragment
|
<fragment
|
||||||
android:id="@+id/songListPageFragment"
|
android:id="@+id/songListPageFragment"
|
||||||
android:name="com.cappielloantonio.play.ui.fragment.SongListPageFragment"
|
android:name="com.cappielloantonio.play.ui.fragment.SongListPageFragment"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue