mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 09:53:33 +00:00
Imports optimization and entries rearranged
This commit is contained in:
parent
3c2837e096
commit
65e47f61ef
63 changed files with 987 additions and 1087 deletions
|
|
@ -56,6 +56,15 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
|
|||
return albums.size();
|
||||
}
|
||||
|
||||
public Album getItem(int position) {
|
||||
return albums.get(position);
|
||||
}
|
||||
|
||||
public void setItems(List<Album> albums) {
|
||||
this.albums = albums;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener {
|
||||
TextView textAlbumName;
|
||||
TextView textArtistName;
|
||||
|
|
@ -79,11 +88,9 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
|
|||
|
||||
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) {
|
||||
} 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) {
|
||||
} else if (Objects.requireNonNull(Navigation.findNavController(view).getCurrentDestination()).getId() == R.id.albumCatalogueFragment) {
|
||||
Navigation.findNavController(view).navigate(R.id.action_albumCatalogueFragment_to_albumPageFragment, bundle);
|
||||
}
|
||||
}
|
||||
|
|
@ -96,13 +103,4 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public Album getItem(int position) {
|
||||
return albums.get(position);
|
||||
}
|
||||
|
||||
public void setItems(List<Album> albums) {
|
||||
this.albums = albums;
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue