mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-01-31 22:53:37 +00:00
Search page renewed
This commit is contained in:
@@ -17,6 +17,7 @@ import com.cappielloantonio.play.model.Album;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder> {
|
||||
private static final String TAG = "AlbumAdapter";
|
||||
@@ -75,7 +76,16 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
|
||||
public void onClick(View view) {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putParcelable("album_object", albums.get(getBindingAdapterPosition()));
|
||||
Navigation.findNavController(view).navigate(R.id.action_libraryFragment_to_albumPageFragment, bundle);
|
||||
|
||||
if (Objects.requireNonNull(Navigation.findNavController(view).getCurrentDestination()).getId() == R.id.searchFragment) {
|
||||
Navigation.findNavController(view).navigate(R.id.action_searchFragment_to_albumPageFragment, bundle);
|
||||
}
|
||||
else if(Objects.requireNonNull(Navigation.findNavController(view).getCurrentDestination()).getId() == R.id.libraryFragment) {
|
||||
Navigation.findNavController(view).navigate(R.id.action_libraryFragment_to_albumPageFragment, bundle);
|
||||
}
|
||||
else if(Objects.requireNonNull(Navigation.findNavController(view).getCurrentDestination()).getId() == R.id.albumCatalogueFragment) {
|
||||
Navigation.findNavController(view).navigate(R.id.action_albumCatalogueFragment_to_albumPageFragment, bundle);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user