mirror of
https://github.com/antebudimir/tempus.git
synced 2025-12-31 09:33:33 +00:00
Add cover image and backdrop integration
This commit is contained in:
parent
6c26c6d889
commit
a0f417fa94
50 changed files with 385 additions and 204 deletions
|
|
@ -70,6 +70,7 @@ dependencies {
|
||||||
|
|
||||||
// Glide
|
// Glide
|
||||||
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
implementation 'com.github.bumptech.glide:glide:4.11.0'
|
||||||
|
implementation "com.github.woltapp:blurhash:f41a23cc50"
|
||||||
|
|
||||||
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
|
||||||
annotationProcessor "androidx.room:room-compiler:2.2.5"
|
annotationProcessor "androidx.room:room-compiler:2.2.5"
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,14 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Album;
|
import com.cappielloantonio.play.model.Album;
|
||||||
import com.cappielloantonio.play.model.Artist;
|
|
||||||
import com.cappielloantonio.play.util.Util;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -40,6 +40,11 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
|
||||||
|
|
||||||
holder.textAlbumName.setText(album.getTitle());
|
holder.textAlbumName.setText(album.getTitle());
|
||||||
holder.textArtistName.setText(album.getArtistName());
|
holder.textArtistName.setText(album.getArtistName());
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, album.getPrimary(), album.getBlurHash(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -50,12 +55,14 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
TextView textAlbumName;
|
TextView textAlbumName;
|
||||||
TextView textArtistName;
|
TextView textArtistName;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
textAlbumName = itemView.findViewById(R.id.album_name_label);
|
textAlbumName = itemView.findViewById(R.id.album_name_label);
|
||||||
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
||||||
|
cover = itemView.findViewById(R.id.album_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,17 +4,19 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Album;
|
import com.cappielloantonio.play.model.Album;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class AlbumArtistPageAdapter extends RecyclerView.Adapter<AlbumArtistPageAdapter.ViewHolder> {
|
public class AlbumArtistPageAdapter extends RecyclerView.Adapter<AlbumArtistPageAdapter.ViewHolder> {
|
||||||
private static final String TAG = "RecentMusicAdapter";
|
private static final String TAG = "AlbumArtistPageAdapter";
|
||||||
private List<Album> albums;
|
private List<Album> albums;
|
||||||
private LayoutInflater mInflater;
|
private LayoutInflater mInflater;
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
@ -37,6 +39,11 @@ public class AlbumArtistPageAdapter extends RecyclerView.Adapter<AlbumArtistPage
|
||||||
Album album = albums.get(position);
|
Album album = albums.get(position);
|
||||||
|
|
||||||
holder.textAlbumName.setText(album.getTitle());
|
holder.textAlbumName.setText(album.getTitle());
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, album.getPrimary(), album.getBlurHash(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -46,11 +53,13 @@ public class AlbumArtistPageAdapter extends RecyclerView.Adapter<AlbumArtistPage
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
TextView textAlbumName;
|
TextView textAlbumName;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
textAlbumName = itemView.findViewById(R.id.album_name_label);
|
textAlbumName = itemView.findViewById(R.id.album_name_label);
|
||||||
|
cover = itemView.findViewById(R.id.artist_page_album_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,14 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Album;
|
import com.cappielloantonio.play.model.Album;
|
||||||
import com.cappielloantonio.play.model.Artist;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -39,6 +40,12 @@ public class AlbumCatalogueAdapter extends RecyclerView.Adapter<AlbumCatalogueAd
|
||||||
|
|
||||||
holder.textAlbumName.setText(album.getTitle());
|
holder.textAlbumName.setText(album.getTitle());
|
||||||
holder.textArtistName.setText(album.getArtistName());
|
holder.textArtistName.setText(album.getArtistName());
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, album.getPrimary(), album.getBlurHash(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
// .override(300)
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -49,12 +56,14 @@ public class AlbumCatalogueAdapter extends RecyclerView.Adapter<AlbumCatalogueAd
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
TextView textAlbumName;
|
TextView textAlbumName;
|
||||||
TextView textArtistName;
|
TextView textArtistName;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
textAlbumName = itemView.findViewById(R.id.album_name_label);
|
textAlbumName = itemView.findViewById(R.id.album_name_label);
|
||||||
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
||||||
|
cover = itemView.findViewById(R.id.album_catalogue_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,14 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Artist;
|
import com.cappielloantonio.play.model.Artist;
|
||||||
import com.cappielloantonio.play.util.Util;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -38,6 +39,11 @@ public class ArtistAdapter extends RecyclerView.Adapter<ArtistAdapter.ViewHolder
|
||||||
Artist artist = artists.get(position);
|
Artist artist = artists.get(position);
|
||||||
|
|
||||||
holder.textArtistName.setText(artist.getName());
|
holder.textArtistName.setText(artist.getName());
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, artist.getPrimary(), artist.getPrimaryBlurHash(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -47,11 +53,13 @@ public class ArtistAdapter extends RecyclerView.Adapter<ArtistAdapter.ViewHolder
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
TextView textArtistName;
|
TextView textArtistName;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
||||||
|
cover = itemView.findViewById(R.id.artist_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,11 +4,13 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Artist;
|
import com.cappielloantonio.play.model.Artist;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -37,6 +39,11 @@ public class ArtistCatalogueAdapter extends RecyclerView.Adapter<ArtistCatalogue
|
||||||
Artist artist = artists.get(position);
|
Artist artist = artists.get(position);
|
||||||
|
|
||||||
holder.textArtistName.setText(artist.getName());
|
holder.textArtistName.setText(artist.getName());
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, artist.getPrimary(), artist.getPrimaryBlurHash(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -46,11 +53,13 @@ public class ArtistCatalogueAdapter extends RecyclerView.Adapter<ArtistCatalogue
|
||||||
|
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
TextView textArtistName;
|
TextView textArtistName;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
textArtistName = itemView.findViewById(R.id.artist_name_label);
|
||||||
|
cover = itemView.findViewById(R.id.artist_catalogue_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.App;
|
import com.cappielloantonio.play.App;
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Song;
|
import com.cappielloantonio.play.model.Song;
|
||||||
import com.cappielloantonio.play.repository.SongRepository;
|
import com.cappielloantonio.play.repository.SongRepository;
|
||||||
|
|
||||||
|
|
@ -40,6 +42,11 @@ public class DiscoverSongAdapter extends RecyclerView.Adapter<DiscoverSongAdapte
|
||||||
|
|
||||||
holder.textTitle.setText(song.getTitle());
|
holder.textTitle.setText(song.getTitle());
|
||||||
holder.textAlbum.setText(song.getAlbumName());
|
holder.textAlbum.setText(song.getAlbumName());
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, song.getPrimary(), song.getPrimary(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -50,12 +57,14 @@ public class DiscoverSongAdapter extends RecyclerView.Adapter<DiscoverSongAdapte
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
TextView textTitle;
|
TextView textTitle;
|
||||||
TextView textAlbum;
|
TextView textAlbum;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
textTitle = itemView.findViewById(R.id.title_discover_song_label);
|
textTitle = itemView.findViewById(R.id.title_discover_song_label);
|
||||||
textAlbum = itemView.findViewById(R.id.album_discover_song_label);
|
textAlbum = itemView.findViewById(R.id.album_discover_song_label);
|
||||||
|
cover = itemView.findViewById(R.id.discover_song_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.App;
|
import com.cappielloantonio.play.App;
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Song;
|
import com.cappielloantonio.play.model.Song;
|
||||||
import com.cappielloantonio.play.repository.SongRepository;
|
import com.cappielloantonio.play.repository.SongRepository;
|
||||||
|
|
||||||
|
|
@ -32,7 +34,7 @@ public class RecentMusicAdapter extends RecyclerView.Adapter<RecentMusicAdapter.
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||||
View view = mInflater.inflate(R.layout.item_home_recent_track, parent, false);
|
View view = mInflater.inflate(R.layout.item_home_track, parent, false);
|
||||||
return new ViewHolder(view);
|
return new ViewHolder(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,6 +44,11 @@ public class RecentMusicAdapter extends RecyclerView.Adapter<RecentMusicAdapter.
|
||||||
|
|
||||||
holder.textTitle.setText(song.getTitle());
|
holder.textTitle.setText(song.getTitle());
|
||||||
holder.textAlbum.setText(song.getAlbumName());
|
holder.textAlbum.setText(song.getAlbumName());
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, song.getPrimary(), song.getPrimary(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -52,12 +59,14 @@ public class RecentMusicAdapter extends RecyclerView.Adapter<RecentMusicAdapter.
|
||||||
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
|
||||||
TextView textTitle;
|
TextView textTitle;
|
||||||
TextView textAlbum;
|
TextView textAlbum;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
||||||
textTitle = itemView.findViewById(R.id.title_track_label);
|
textTitle = itemView.findViewById(R.id.title_track_label);
|
||||||
textAlbum = itemView.findViewById(R.id.album_track_label);
|
textAlbum = itemView.findViewById(R.id.album_track_label);
|
||||||
|
cover = itemView.findViewById(R.id.track_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,14 @@ import android.content.Context;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
import com.cappielloantonio.play.App;
|
import com.cappielloantonio.play.App;
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Song;
|
import com.cappielloantonio.play.model.Song;
|
||||||
import com.cappielloantonio.play.repository.SongRepository;
|
import com.cappielloantonio.play.repository.SongRepository;
|
||||||
import com.cappielloantonio.play.util.Util;
|
import com.cappielloantonio.play.util.Util;
|
||||||
|
|
@ -44,6 +46,11 @@ public class SongResultSearchAdapter extends RecyclerView.Adapter<SongResultSear
|
||||||
holder.songTitle.setText(song.getTitle());
|
holder.songTitle.setText(song.getTitle());
|
||||||
holder.songArtist.setText(song.getArtistName());
|
holder.songArtist.setText(song.getArtistName());
|
||||||
holder.songDuration.setText(Util.getReadableDurationString(song.getDuration()));
|
holder.songDuration.setText(Util.getReadableDurationString(song.getDuration()));
|
||||||
|
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(context, song.getPrimary(), song.getPrimary(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(holder.cover);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -55,6 +62,7 @@ public class SongResultSearchAdapter extends RecyclerView.Adapter<SongResultSear
|
||||||
TextView songTitle;
|
TextView songTitle;
|
||||||
TextView songArtist;
|
TextView songArtist;
|
||||||
TextView songDuration;
|
TextView songDuration;
|
||||||
|
ImageView cover;
|
||||||
|
|
||||||
ViewHolder(View itemView) {
|
ViewHolder(View itemView) {
|
||||||
super(itemView);
|
super(itemView);
|
||||||
|
|
@ -62,6 +70,7 @@ public class SongResultSearchAdapter extends RecyclerView.Adapter<SongResultSear
|
||||||
songTitle = itemView.findViewById(R.id.search_result_song_title_text_view);
|
songTitle = itemView.findViewById(R.id.search_result_song_title_text_view);
|
||||||
songArtist = itemView.findViewById(R.id.search_result_song_artist_text_view);
|
songArtist = itemView.findViewById(R.id.search_result_song_artist_text_view);
|
||||||
songDuration = itemView.findViewById(R.id.search_result_song_duration_text_view);
|
songDuration = itemView.findViewById(R.id.search_result_song_duration_text_view);
|
||||||
|
cover = itemView.findViewById(R.id.song_cover_image_view);
|
||||||
|
|
||||||
itemView.setOnClickListener(this);
|
itemView.setOnClickListener(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
package com.cappielloantonio.play.glide;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.graphics.Bitmap;
|
||||||
|
import android.graphics.drawable.BitmapDrawable;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
|
|
||||||
|
import androidx.core.content.res.ResourcesCompat;
|
||||||
|
|
||||||
|
import com.bumptech.glide.Glide;
|
||||||
|
import com.bumptech.glide.RequestBuilder;
|
||||||
|
import com.bumptech.glide.RequestManager;
|
||||||
|
import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
||||||
|
import com.bumptech.glide.request.RequestOptions;
|
||||||
|
import com.bumptech.glide.signature.ObjectKey;
|
||||||
|
import com.cappielloantonio.play.App;
|
||||||
|
import com.cappielloantonio.play.R;
|
||||||
|
import com.wolt.blurhashkt.BlurHashDecoder;
|
||||||
|
|
||||||
|
import org.jellyfin.apiclient.model.dto.ImageOptions;
|
||||||
|
import org.jellyfin.apiclient.model.entities.ImageType;
|
||||||
|
|
||||||
|
public class CustomGlideRequest {
|
||||||
|
public static final String PRIMARY = "PRIMARY";
|
||||||
|
public static final String BACKDROP = "BACKDROP";
|
||||||
|
|
||||||
|
public static final DiskCacheStrategy DEFAULT_DISK_CACHE_STRATEGY = DiskCacheStrategy.ALL;
|
||||||
|
public static final int DEFAULT_IMAGE = R.drawable.ic_launcher_background;
|
||||||
|
|
||||||
|
public static class Builder {
|
||||||
|
private final RequestManager requestManager;
|
||||||
|
private final Object item;
|
||||||
|
private final Context context;
|
||||||
|
|
||||||
|
private Builder(Context context, String item, String placeholder, String itemType) {
|
||||||
|
this.requestManager = Glide.with(context);
|
||||||
|
this.item = item != null ? createUrl(item, itemType) : DEFAULT_IMAGE;
|
||||||
|
this.context = context;
|
||||||
|
|
||||||
|
if (placeholder != null) {
|
||||||
|
Bitmap bitmap = BlurHashDecoder.INSTANCE.decode(placeholder, 40, 40, 1, true);
|
||||||
|
BitmapDrawable drawable = new BitmapDrawable(context.getResources(), bitmap);
|
||||||
|
requestManager.applyDefaultRequestOptions(createRequestOptions(item, drawable));
|
||||||
|
} else {
|
||||||
|
Drawable drawable = ResourcesCompat.getDrawable(context.getResources(), DEFAULT_IMAGE, null);
|
||||||
|
requestManager.applyDefaultRequestOptions(createRequestOptions(item, drawable));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Builder from(Context context, String item, String placeholder, String itemType) {
|
||||||
|
return new Builder(context, item, placeholder, itemType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public RequestBuilder<Drawable> build() {
|
||||||
|
return requestManager.load(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RequestOptions createRequestOptions(String item, Drawable placeholder) {
|
||||||
|
RequestOptions options = new RequestOptions()
|
||||||
|
.placeholder(placeholder)
|
||||||
|
.error(DEFAULT_IMAGE)
|
||||||
|
.diskCacheStrategy(DEFAULT_DISK_CACHE_STRATEGY)
|
||||||
|
.signature(new ObjectKey(item != null ? item : 0))
|
||||||
|
.centerCrop();
|
||||||
|
|
||||||
|
return options;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String createUrl(String item, String itemType) {
|
||||||
|
ImageOptions options = new ImageOptions();
|
||||||
|
switch(itemType) {
|
||||||
|
case PRIMARY: {
|
||||||
|
options.setImageType(ImageType.Primary);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BACKDROP: {
|
||||||
|
options.setImageType(ImageType.Backdrop);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options.setQuality(100);
|
||||||
|
options.setMaxHeight(500);
|
||||||
|
options.setEnableImageEnhancers(true);
|
||||||
|
|
||||||
|
return App.getApiClientInstance(App.getInstance()).GetImageUrl(item, options);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,12 +5,12 @@ import android.view.View;
|
||||||
|
|
||||||
import androidx.recyclerview.widget.RecyclerView;
|
import androidx.recyclerview.widget.RecyclerView;
|
||||||
|
|
||||||
public class ItemlDecoration extends RecyclerView.ItemDecoration {
|
public class ItemDecoration extends RecyclerView.ItemDecoration {
|
||||||
private int spanCount;
|
private int spanCount;
|
||||||
private int spacing;
|
private int spacing;
|
||||||
private boolean includeEdge;
|
private boolean includeEdge;
|
||||||
|
|
||||||
public ItemlDecoration(int spanCount, int spacing, boolean includeEdge) {
|
public ItemDecoration(int spanCount, int spacing, boolean includeEdge) {
|
||||||
this.spanCount = spanCount;
|
this.spanCount = spanCount;
|
||||||
this.spacing = spacing;
|
this.spacing = spacing;
|
||||||
this.includeEdge = includeEdge;
|
this.includeEdge = includeEdge;
|
||||||
|
|
@ -59,13 +59,13 @@ public class Artist implements Parcelable {
|
||||||
this.id = itemDto.getId();
|
this.id = itemDto.getId();
|
||||||
this.name = itemDto.getName();
|
this.name = itemDto.getName();
|
||||||
|
|
||||||
this.primary = itemDto.getImageTags().getOrDefault(ImageType.Primary, null);
|
this.primary = itemDto.getImageTags().containsKey(ImageType.Primary) ? id : null;
|
||||||
if (itemDto.getImageBlurHashes() != null && itemDto.getImageBlurHashes().get(ImageType.Primary) != null) {
|
if (itemDto.getImageBlurHashes() != null && itemDto.getImageBlurHashes().get(ImageType.Primary) != null) {
|
||||||
this.primaryBlurHash = (String) itemDto.getImageBlurHashes().get(ImageType.Primary).values().toArray()[0];
|
this.primaryBlurHash = (String) itemDto.getImageBlurHashes().get(ImageType.Primary).values().toArray()[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.backdrop = itemDto.getBackdropImageTags().get(0);
|
this.backdrop = !itemDto.getBackdropImageTags().get(0).isEmpty() ? id : null;
|
||||||
if (itemDto.getImageBlurHashes() != null && itemDto.getBackdropImageTags().get(0) != null) {
|
if (itemDto.getImageBlurHashes() != null && itemDto.getBackdropImageTags().get(0) != null) {
|
||||||
this.backdropBlurHash = (String) itemDto.getImageBlurHashes().get(ImageType.Backdrop).values().toArray()[0];
|
this.backdropBlurHash = (String) itemDto.getImageBlurHashes().get(ImageType.Backdrop).values().toArray()[0];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,14 +88,19 @@ public class MainActivity extends BaseActivity {
|
||||||
|
|
||||||
public void goToSync() {
|
public void goToSync() {
|
||||||
bottomNavigationView.setVisibility(View.GONE);
|
bottomNavigationView.setVisibility(View.GONE);
|
||||||
Bundle bundle = SyncUtil.getSyncBundle(true, true, true, true, true, false);
|
|
||||||
|
|
||||||
if (Objects.requireNonNull(navController.getCurrentDestination()).getId() == R.id.landingFragment) {
|
if (Objects.requireNonNull(navController.getCurrentDestination()).getId() == R.id.landingFragment) {
|
||||||
|
Bundle bundle = SyncUtil.getSyncBundle(true, true, true, true, true, false);
|
||||||
navController.navigate(R.id.action_landingFragment_to_syncFragment, bundle);
|
navController.navigate(R.id.action_landingFragment_to_syncFragment, bundle);
|
||||||
} else if (Objects.requireNonNull(navController.getCurrentDestination()).getId() == R.id.loginFragment) {
|
} else if (Objects.requireNonNull(navController.getCurrentDestination()).getId() == R.id.loginFragment) {
|
||||||
|
Bundle bundle = SyncUtil.getSyncBundle(true, true, true, true, true, false);
|
||||||
navController.navigate(R.id.action_loginFragment_to_syncFragment, bundle);
|
navController.navigate(R.id.action_loginFragment_to_syncFragment, bundle);
|
||||||
} else if (Objects.requireNonNull(navController.getCurrentDestination()).getId() == R.id.homeFragment) {
|
} else if (Objects.requireNonNull(navController.getCurrentDestination()).getId() == R.id.homeFragment) {
|
||||||
|
Bundle bundle = SyncUtil.getSyncBundle(true, true, true, true, true, false);
|
||||||
navController.navigate(R.id.action_homeFragment_to_syncFragment, bundle);
|
navController.navigate(R.id.action_homeFragment_to_syncFragment, bundle);
|
||||||
|
} else if (Objects.requireNonNull(navController.getCurrentDestination()).getId() == R.id.libraryFragment) {
|
||||||
|
Bundle bundle = SyncUtil.getSyncBundle(false, false, true, false, false, true);
|
||||||
|
navController.navigate(R.id.action_libraryFragment_to_syncFragment, bundle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
|
|
@ -13,7 +12,7 @@ import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
import com.cappielloantonio.play.adapter.AlbumCatalogueAdapter;
|
import com.cappielloantonio.play.adapter.AlbumCatalogueAdapter;
|
||||||
import com.cappielloantonio.play.databinding.FragmentAlbumCatalogueBinding;
|
import com.cappielloantonio.play.databinding.FragmentAlbumCatalogueBinding;
|
||||||
import com.cappielloantonio.play.helper.recyclerview.ItemlDecoration;
|
import com.cappielloantonio.play.helper.recyclerview.ItemDecoration;
|
||||||
import com.cappielloantonio.play.ui.activities.MainActivity;
|
import com.cappielloantonio.play.ui.activities.MainActivity;
|
||||||
import com.cappielloantonio.play.viewmodel.AlbumCatalogueViewModel;
|
import com.cappielloantonio.play.viewmodel.AlbumCatalogueViewModel;
|
||||||
|
|
||||||
|
|
@ -49,7 +48,7 @@ public class AlbumCatalogueFragment extends Fragment {
|
||||||
|
|
||||||
private void initAlbumCatalogueView() {
|
private void initAlbumCatalogueView() {
|
||||||
bind.albumCatalogueRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
bind.albumCatalogueRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||||
bind.albumCatalogueRecyclerView.addItemDecoration(new ItemlDecoration(2, 20, false));
|
bind.albumCatalogueRecyclerView.addItemDecoration(new ItemDecoration(2, 20, false));
|
||||||
bind.albumCatalogueRecyclerView.setHasFixedSize(true);
|
bind.albumCatalogueRecyclerView.setHasFixedSize(true);
|
||||||
|
|
||||||
albumAdapter = new AlbumCatalogueAdapter(requireContext(), new ArrayList<>());
|
albumAdapter = new AlbumCatalogueAdapter(requireContext(), new ArrayList<>());
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,11 @@ import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import com.cappielloantonio.play.adapter.AlbumArtistPageAdapter;
|
|
||||||
import com.cappielloantonio.play.adapter.SongResultSearchAdapter;
|
import com.cappielloantonio.play.adapter.SongResultSearchAdapter;
|
||||||
import com.cappielloantonio.play.databinding.FragmentAlbumPageBinding;
|
import com.cappielloantonio.play.databinding.FragmentAlbumPageBinding;
|
||||||
import com.cappielloantonio.play.databinding.FragmentArtistPageBinding;
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Album;
|
|
||||||
import com.cappielloantonio.play.ui.activities.MainActivity;
|
import com.cappielloantonio.play.ui.activities.MainActivity;
|
||||||
import com.cappielloantonio.play.viewmodel.AlbumPageViewModel;
|
import com.cappielloantonio.play.viewmodel.AlbumPageViewModel;
|
||||||
import com.cappielloantonio.play.viewmodel.ArtistPageViewModel;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
@ -37,6 +34,7 @@ public class AlbumPageFragment extends Fragment {
|
||||||
albumPageViewModel = new ViewModelProvider(requireActivity()).get(AlbumPageViewModel.class);
|
albumPageViewModel = new ViewModelProvider(requireActivity()).get(AlbumPageViewModel.class);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
initBackCover();
|
||||||
initSongsView();
|
initSongsView();
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
|
|
@ -48,6 +46,13 @@ public class AlbumPageFragment extends Fragment {
|
||||||
bind = null;
|
bind = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initBackCover() {
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(requireContext(), albumPageViewModel.getAlbum().getPrimary(), albumPageViewModel.getAlbum().getBlurHash(), CustomGlideRequest.PRIMARY)
|
||||||
|
.build()
|
||||||
|
.into(bind.albumBackCoverImageView);
|
||||||
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
albumPageViewModel.setAlbum(getArguments().getParcelable("album_object"));
|
albumPageViewModel.setAlbum(getArguments().getParcelable("album_object"));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,26 +4,19 @@ import android.os.Bundle;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.Observer;
|
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
|
||||||
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
import com.cappielloantonio.play.adapter.ArtistAdapter;
|
|
||||||
import com.cappielloantonio.play.adapter.ArtistCatalogueAdapter;
|
import com.cappielloantonio.play.adapter.ArtistCatalogueAdapter;
|
||||||
import com.cappielloantonio.play.adapter.RecentMusicAdapter;
|
|
||||||
import com.cappielloantonio.play.databinding.FragmentArtistCatalogueBinding;
|
import com.cappielloantonio.play.databinding.FragmentArtistCatalogueBinding;
|
||||||
import com.cappielloantonio.play.helper.recyclerview.ItemlDecoration;
|
import com.cappielloantonio.play.helper.recyclerview.ItemDecoration;
|
||||||
import com.cappielloantonio.play.model.Artist;
|
|
||||||
import com.cappielloantonio.play.ui.activities.MainActivity;
|
import com.cappielloantonio.play.ui.activities.MainActivity;
|
||||||
import com.cappielloantonio.play.viewmodel.ArtistCatalogueViewModel;
|
import com.cappielloantonio.play.viewmodel.ArtistCatalogueViewModel;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ArtistCatalogueFragment extends Fragment {
|
public class ArtistCatalogueFragment extends Fragment {
|
||||||
private static final String TAG = "ArtistCatalogueFragment";
|
private static final String TAG = "ArtistCatalogueFragment";
|
||||||
|
|
@ -55,7 +48,7 @@ public class ArtistCatalogueFragment extends Fragment {
|
||||||
|
|
||||||
private void initArtistCatalogueView() {
|
private void initArtistCatalogueView() {
|
||||||
bind.artistCatalogueRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
bind.artistCatalogueRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||||
bind.artistCatalogueRecyclerView.addItemDecoration(new ItemlDecoration(2, 20, false));
|
bind.artistCatalogueRecyclerView.addItemDecoration(new ItemDecoration(2, 20, false));
|
||||||
bind.artistCatalogueRecyclerView.setHasFixedSize(true);
|
bind.artistCatalogueRecyclerView.setHasFixedSize(true);
|
||||||
|
|
||||||
artistAdapter = new ArtistCatalogueAdapter(requireContext(), new ArrayList<>());
|
artistAdapter = new ArtistCatalogueAdapter(requireContext(), new ArrayList<>());
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,22 @@
|
||||||
package com.cappielloantonio.play.ui.fragment;
|
package com.cappielloantonio.play.ui.fragment;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.view.ViewGroup;
|
|
||||||
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
import com.cappielloantonio.play.adapter.AlbumArtistPageAdapter;
|
import com.cappielloantonio.play.adapter.AlbumArtistPageAdapter;
|
||||||
import com.cappielloantonio.play.adapter.RecentMusicAdapter;
|
|
||||||
import com.cappielloantonio.play.adapter.SongResultSearchAdapter;
|
import com.cappielloantonio.play.adapter.SongResultSearchAdapter;
|
||||||
import com.cappielloantonio.play.databinding.FragmentArtistPageBinding;
|
import com.cappielloantonio.play.databinding.FragmentArtistPageBinding;
|
||||||
import com.cappielloantonio.play.databinding.FragmentHomeBinding;
|
import com.cappielloantonio.play.glide.CustomGlideRequest;
|
||||||
import com.cappielloantonio.play.model.Song;
|
import com.cappielloantonio.play.model.Song;
|
||||||
import com.cappielloantonio.play.ui.activities.MainActivity;
|
import com.cappielloantonio.play.ui.activities.MainActivity;
|
||||||
import com.cappielloantonio.play.viewmodel.ArtistPageViewModel;
|
import com.cappielloantonio.play.viewmodel.ArtistPageViewModel;
|
||||||
import com.cappielloantonio.play.viewmodel.HomeViewModel;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
|
@ -41,6 +38,7 @@ public class ArtistPageFragment extends Fragment {
|
||||||
artistPageViewModel = new ViewModelProvider(requireActivity()).get(ArtistPageViewModel.class);
|
artistPageViewModel = new ViewModelProvider(requireActivity()).get(ArtistPageViewModel.class);
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
initBackdrop();
|
||||||
initTopSongsView();
|
initTopSongsView();
|
||||||
initAlbumsView();
|
initAlbumsView();
|
||||||
|
|
||||||
|
|
@ -68,6 +66,13 @@ public class ArtistPageFragment extends Fragment {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void initBackdrop() {
|
||||||
|
CustomGlideRequest.Builder
|
||||||
|
.from(requireContext(), artistPageViewModel.getArtist().getBackdrop(), artistPageViewModel.getArtist().getBackdropBlurHash(), CustomGlideRequest.BACKDROP)
|
||||||
|
.build()
|
||||||
|
.into(bind.artistBackdropImageView);
|
||||||
|
}
|
||||||
|
|
||||||
private void initTopSongsView() {
|
private void initTopSongsView() {
|
||||||
bind.mostStreamedSongRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
bind.mostStreamedSongRecyclerView.setLayoutManager(new LinearLayoutManager(requireContext()));
|
||||||
bind.mostStreamedSongRecyclerView.setHasFixedSize(true);
|
bind.mostStreamedSongRecyclerView.setHasFixedSize(true);
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,23 @@
|
||||||
package com.cappielloantonio.play.ui.fragment;
|
package com.cappielloantonio.play.ui.fragment;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
|
|
||||||
import com.cappielloantonio.play.App;
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
import com.cappielloantonio.play.adapter.ArtistCatalogueAdapter;
|
|
||||||
import com.cappielloantonio.play.adapter.GenreAdapter;
|
|
||||||
import com.cappielloantonio.play.adapter.GenreCatalogueAdapter;
|
import com.cappielloantonio.play.adapter.GenreCatalogueAdapter;
|
||||||
import com.cappielloantonio.play.databinding.FragmentArtistCatalogueBinding;
|
|
||||||
import com.cappielloantonio.play.databinding.FragmentGenreCatalogueBinding;
|
import com.cappielloantonio.play.databinding.FragmentGenreCatalogueBinding;
|
||||||
import com.cappielloantonio.play.helper.recyclerview.ItemlDecoration;
|
import com.cappielloantonio.play.helper.recyclerview.ItemDecoration;
|
||||||
import com.cappielloantonio.play.interfaces.MediaCallback;
|
|
||||||
import com.cappielloantonio.play.model.Genre;
|
|
||||||
import com.cappielloantonio.play.model.Song;
|
import com.cappielloantonio.play.model.Song;
|
||||||
import com.cappielloantonio.play.model.SongGenreCross;
|
|
||||||
import com.cappielloantonio.play.repository.GenreRepository;
|
|
||||||
import com.cappielloantonio.play.ui.activities.MainActivity;
|
import com.cappielloantonio.play.ui.activities.MainActivity;
|
||||||
import com.cappielloantonio.play.util.PreferenceUtil;
|
|
||||||
import com.cappielloantonio.play.util.SyncUtil;
|
|
||||||
import com.cappielloantonio.play.viewmodel.ArtistCatalogueViewModel;
|
|
||||||
import com.cappielloantonio.play.viewmodel.GenreCatalogueViewModel;
|
import com.cappielloantonio.play.viewmodel.GenreCatalogueViewModel;
|
||||||
import com.google.android.material.snackbar.BaseTransientBottomBar;
|
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class GenreCatalogueFragment extends Fragment {
|
public class GenreCatalogueFragment extends Fragment {
|
||||||
private static final String TAG = "GenreCatalogueFragment";;
|
private static final String TAG = "GenreCatalogueFragment";;
|
||||||
|
|
@ -71,7 +54,7 @@ public class GenreCatalogueFragment extends Fragment {
|
||||||
|
|
||||||
private void initArtistCatalogueView() {
|
private void initArtistCatalogueView() {
|
||||||
bind.genreCatalogueRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
bind.genreCatalogueRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||||
bind.genreCatalogueRecyclerView.addItemDecoration(new ItemlDecoration(2, 16, false));
|
bind.genreCatalogueRecyclerView.addItemDecoration(new ItemDecoration(2, 16, false));
|
||||||
bind.genreCatalogueRecyclerView.setHasFixedSize(true);
|
bind.genreCatalogueRecyclerView.setHasFixedSize(true);
|
||||||
|
|
||||||
genreCatalogueAdapter = new GenreCatalogueAdapter(requireContext(), new ArrayList<>());
|
genreCatalogueAdapter = new GenreCatalogueAdapter(requireContext(), new ArrayList<>());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.cappielloantonio.play.ui.fragment;
|
package com.cappielloantonio.play.ui.fragment;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
|
@ -10,37 +9,23 @@ import android.widget.Toast;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import androidx.core.content.ContextCompat;
|
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
import androidx.lifecycle.Observer;
|
|
||||||
import androidx.lifecycle.ViewModelProvider;
|
import androidx.lifecycle.ViewModelProvider;
|
||||||
import androidx.recyclerview.widget.GridLayoutManager;
|
import androidx.recyclerview.widget.GridLayoutManager;
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||||
|
|
||||||
import com.cappielloantonio.play.App;
|
|
||||||
import com.cappielloantonio.play.R;
|
import com.cappielloantonio.play.R;
|
||||||
import com.cappielloantonio.play.adapter.AlbumAdapter;
|
import com.cappielloantonio.play.adapter.AlbumAdapter;
|
||||||
import com.cappielloantonio.play.adapter.ArtistAdapter;
|
import com.cappielloantonio.play.adapter.ArtistAdapter;
|
||||||
import com.cappielloantonio.play.adapter.GenreAdapter;
|
import com.cappielloantonio.play.adapter.GenreAdapter;
|
||||||
import com.cappielloantonio.play.adapter.PlaylistAdapter;
|
import com.cappielloantonio.play.adapter.PlaylistAdapter;
|
||||||
import com.cappielloantonio.play.databinding.FragmentLibraryBinding;
|
import com.cappielloantonio.play.databinding.FragmentLibraryBinding;
|
||||||
import com.cappielloantonio.play.interfaces.MediaCallback;
|
|
||||||
import com.cappielloantonio.play.model.Album;
|
|
||||||
import com.cappielloantonio.play.model.Artist;
|
|
||||||
import com.cappielloantonio.play.model.Genre;
|
|
||||||
import com.cappielloantonio.play.model.Playlist;
|
|
||||||
import com.cappielloantonio.play.model.Song;
|
import com.cappielloantonio.play.model.Song;
|
||||||
import com.cappielloantonio.play.model.SongGenreCross;
|
|
||||||
import com.cappielloantonio.play.repository.GenreRepository;
|
|
||||||
import com.cappielloantonio.play.ui.activities.MainActivity;
|
import com.cappielloantonio.play.ui.activities.MainActivity;
|
||||||
import com.cappielloantonio.play.util.PreferenceUtil;
|
import com.cappielloantonio.play.util.PreferenceUtil;
|
||||||
import com.cappielloantonio.play.util.SyncUtil;
|
|
||||||
import com.cappielloantonio.play.viewmodel.LibraryViewModel;
|
import com.cappielloantonio.play.viewmodel.LibraryViewModel;
|
||||||
import com.google.android.material.snackbar.BaseTransientBottomBar;
|
|
||||||
import com.google.android.material.snackbar.Snackbar;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class LibraryFragment extends Fragment {
|
public class LibraryFragment extends Fragment {
|
||||||
private static final String TAG = "LibraryFragment";
|
private static final String TAG = "LibraryFragment";
|
||||||
|
|
@ -151,7 +136,6 @@ public class LibraryFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void syncSongsPerGenre() {
|
private void syncSongsPerGenre() {
|
||||||
Bundle bundle = SyncUtil.getSyncBundle(false, false, true, false, false, true);
|
activity.goToSync();
|
||||||
activity.navController.navigate(R.id.action_libraryFragment_to_syncFragment, bundle);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import com.cappielloantonio.play.adapter.ArtistCatalogueAdapter;
|
||||||
import com.cappielloantonio.play.adapter.RecentSearchAdapter;
|
import com.cappielloantonio.play.adapter.RecentSearchAdapter;
|
||||||
import com.cappielloantonio.play.adapter.SongResultSearchAdapter;
|
import com.cappielloantonio.play.adapter.SongResultSearchAdapter;
|
||||||
import com.cappielloantonio.play.databinding.FragmentSearchBinding;
|
import com.cappielloantonio.play.databinding.FragmentSearchBinding;
|
||||||
import com.cappielloantonio.play.helper.recyclerview.ItemlDecoration;
|
import com.cappielloantonio.play.helper.recyclerview.ItemDecoration;
|
||||||
import com.cappielloantonio.play.model.RecentSearch;
|
import com.cappielloantonio.play.model.RecentSearch;
|
||||||
import com.cappielloantonio.play.ui.activities.MainActivity;
|
import com.cappielloantonio.play.ui.activities.MainActivity;
|
||||||
import com.cappielloantonio.play.viewmodel.SearchViewModel;
|
import com.cappielloantonio.play.viewmodel.SearchViewModel;
|
||||||
|
|
@ -92,7 +92,7 @@ public class SearchFragment extends Fragment {
|
||||||
|
|
||||||
// Albums
|
// Albums
|
||||||
bind.searchResultAlbumRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
bind.searchResultAlbumRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||||
bind.searchResultAlbumRecyclerView.addItemDecoration(new ItemlDecoration(2, 20, false));
|
bind.searchResultAlbumRecyclerView.addItemDecoration(new ItemDecoration(2, 20, false));
|
||||||
bind.searchResultAlbumRecyclerView.setHasFixedSize(true);
|
bind.searchResultAlbumRecyclerView.setHasFixedSize(true);
|
||||||
|
|
||||||
albumResultSearchAdapter = new AlbumCatalogueAdapter(requireContext(), new ArrayList<>());
|
albumResultSearchAdapter = new AlbumCatalogueAdapter(requireContext(), new ArrayList<>());
|
||||||
|
|
@ -105,7 +105,7 @@ public class SearchFragment extends Fragment {
|
||||||
|
|
||||||
// Artist
|
// Artist
|
||||||
bind.searchResultArtistRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
bind.searchResultArtistRecyclerView.setLayoutManager(new GridLayoutManager(requireContext(), 2));
|
||||||
bind.searchResultArtistRecyclerView.addItemDecoration(new ItemlDecoration(2, 20, false));
|
bind.searchResultArtistRecyclerView.addItemDecoration(new ItemDecoration(2, 20, false));
|
||||||
bind.searchResultArtistRecyclerView.setHasFixedSize(true);
|
bind.searchResultArtistRecyclerView.setHasFixedSize(true);
|
||||||
|
|
||||||
artistResultSearchAdapter = new ArtistCatalogueAdapter(requireContext(), new ArrayList<>());
|
artistResultSearchAdapter = new ArtistCatalogueAdapter(requireContext(), new ArrayList<>());
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.cappielloantonio.play.viewmodel;
|
package com.cappielloantonio.play.viewmodel;
|
||||||
|
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.util.Log;
|
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.lifecycle.AndroidViewModel;
|
import androidx.lifecycle.AndroidViewModel;
|
||||||
|
|
@ -9,17 +8,15 @@ import androidx.lifecycle.LiveData;
|
||||||
|
|
||||||
import com.cappielloantonio.play.model.Album;
|
import com.cappielloantonio.play.model.Album;
|
||||||
import com.cappielloantonio.play.model.Artist;
|
import com.cappielloantonio.play.model.Artist;
|
||||||
import com.cappielloantonio.play.model.Genre;
|
|
||||||
import com.cappielloantonio.play.model.RecentSearch;
|
import com.cappielloantonio.play.model.RecentSearch;
|
||||||
import com.cappielloantonio.play.model.Song;
|
import com.cappielloantonio.play.model.Song;
|
||||||
import com.cappielloantonio.play.repository.AlbumRepository;
|
import com.cappielloantonio.play.repository.AlbumRepository;
|
||||||
import com.cappielloantonio.play.repository.ArtistRepository;
|
import com.cappielloantonio.play.repository.ArtistRepository;
|
||||||
import com.cappielloantonio.play.repository.GenreRepository;
|
|
||||||
import com.cappielloantonio.play.repository.RecentSearchRepository;
|
import com.cappielloantonio.play.repository.RecentSearchRepository;
|
||||||
import com.cappielloantonio.play.repository.SongRepository;
|
import com.cappielloantonio.play.repository.SongRepository;
|
||||||
import com.paulrybitskyi.persistentsearchview.adapters.model.SuggestionItem;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class SearchViewModel extends AndroidViewModel {
|
public class SearchViewModel extends AndroidViewModel {
|
||||||
|
|
@ -78,6 +75,9 @@ public class SearchViewModel extends AndroidViewModel {
|
||||||
suggestions.addAll(albumRepository.getSearchSuggestion(query));
|
suggestions.addAll(albumRepository.getSearchSuggestion(query));
|
||||||
suggestions.addAll(artistRepository.getSearchSuggestion(query));
|
suggestions.addAll(artistRepository.getSearchSuggestion(query));
|
||||||
|
|
||||||
return suggestions;
|
LinkedHashSet<String> hashSet = new LinkedHashSet<>(suggestions);
|
||||||
|
ArrayList<String> suggestionsWithoutDuplicates = new ArrayList<>(hashSet);
|
||||||
|
|
||||||
|
return suggestionsWithoutDuplicates;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="@color/cardColor" />
|
<solid android:color="@color/cardColor" />
|
||||||
<corners android:radius="4dp" />
|
<corners android:radius="0dp" />
|
||||||
</shape>
|
</shape>
|
||||||
8
app/src/main/res/drawable/discover_background_image.xml
Normal file
8
app/src/main/res/drawable/discover_background_image.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:startColor="#00000000"
|
||||||
|
android:endColor="#FF000000"
|
||||||
|
android:angle="180"
|
||||||
|
android:dither="true" />
|
||||||
|
</shape>
|
||||||
8
app/src/main/res/drawable/gradient_background_image.xml
Normal file
8
app/src/main/res/drawable/gradient_background_image.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<gradient
|
||||||
|
android:startColor="#00000000"
|
||||||
|
android:endColor="#FF000000"
|
||||||
|
android:angle="270"
|
||||||
|
android:dither="true" />
|
||||||
|
</shape>
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
|
android:fitsSystemWindows="true"
|
||||||
app:defaultNavHost="true"
|
app:defaultNavHost="true"
|
||||||
app:navGraph="@navigation/nav_graph" />
|
app:navGraph="@navigation/nav_graph" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,26 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/album_back_cover_image_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/gradient_background_image" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/album_title_label"
|
android:id="@+id/album_title_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="40sp"
|
android:textSize="40sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,26 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/artist_backdrop_image_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/gradient_background_image" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/artist_name_label"
|
android:id="@+id/artist_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="40sp"
|
android:textSize="40sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/loading_progress_bar"
|
android:id="@+id/loading_progress_bar"
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/loading_progress_bar"
|
android:id="@+id/loading_progress_bar"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,8 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior">
|
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior">
|
app:layout_behavior="@string/hide_bottom_view_on_scroll_behavior"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -166,7 +167,7 @@
|
||||||
android:paddingStart="8dp"
|
android:paddingStart="8dp"
|
||||||
android:paddingTop="12dp"
|
android:paddingTop="12dp"
|
||||||
android:paddingEnd="8dp"
|
android:paddingEnd="8dp"
|
||||||
android:text="My Genres"
|
android:text="Music By Genre"
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="22sp"
|
android:textSize="22sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<com.paulrybitskyi.persistentsearchview.PersistentSearchView
|
<com.paulrybitskyi.persistentsearchview.PersistentSearchView
|
||||||
android:id="@+id/persistentSearchView"
|
android:id="@+id/persistentSearchView"
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="20dp">
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
<androidx.core.widget.NestedScrollView
|
<androidx.core.widget.NestedScrollView
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,8 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent"
|
||||||
|
android:paddingTop="20dp">
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/loading_progress_bar"
|
android:id="@+id/loading_progress_bar"
|
||||||
|
|
|
||||||
|
|
@ -7,25 +7,32 @@
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/card_view"
|
android:id="@+id/card_view"
|
||||||
android:layout_width="256dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="256dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:backgroundTint="@color/cardColor"
|
android:backgroundTint="@color/cardColor"
|
||||||
card_view:cardCornerRadius="4dp"
|
card_view:cardCornerRadius="4dp"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
card_view:cardPreventCornerOverlap="false"
|
card_view:cardPreventCornerOverlap="false"
|
||||||
card_view:cardUseCompatPadding="true" />
|
card_view:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/artist_page_album_cover_image_view"
|
||||||
|
android:layout_width="256dp"
|
||||||
|
android:layout_height="256dp" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/album_name_label"
|
android:id="@+id/album_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="2"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:text="@string/label_placeholder"
|
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,22 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:backgroundTint="@color/cardColor"
|
|
||||||
app:cardCornerRadius="4dp"
|
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:layout_marginStart="16dp"
|
android:layout_marginStart="16dp"
|
||||||
android:layout_marginEnd="16dp">
|
android:layout_marginTop="8dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:layout_marginBottom="16dp"
|
||||||
|
android:backgroundTint="@color/cardColor"
|
||||||
|
app:cardCornerRadius="4dp">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/discover_song_cover_image_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="172dp" />
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="172dp"
|
||||||
|
android:background="@drawable/discover_background_image" />
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -21,8 +31,9 @@
|
||||||
android:layout_marginLeft="16dp"
|
android:layout_marginLeft="16dp"
|
||||||
android:layout_marginTop="18dp"
|
android:layout_marginTop="18dp"
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:text="@string/label_placeholder"
|
android:ellipsize="end"
|
||||||
android:textColor="@color/titleTextColor"
|
android:maxLines="2"
|
||||||
|
android:textColor="@color/gradientTitleColor"
|
||||||
android:textSize="20sp" />
|
android:textSize="20sp" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
|
@ -34,9 +45,8 @@
|
||||||
android:layout_marginRight="16dp"
|
android:layout_marginRight="16dp"
|
||||||
android:drawablePadding="10dp"
|
android:drawablePadding="10dp"
|
||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:maxLines="3"
|
android:maxLines="1"
|
||||||
android:text="@string/label_placeholder"
|
android:textColor="@color/gradientSubtitleColor"
|
||||||
android:textColor="@color/subtitleTextColor"
|
|
||||||
android:textSize="14sp" />
|
android:textSize="14sp" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
|
||||||
|
|
@ -7,21 +7,29 @@
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/card_view"
|
android:id="@+id/card_view"
|
||||||
android:layout_width="172dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="172dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:backgroundTint="@color/cardColor"
|
android:backgroundTint="@color/cardColor"
|
||||||
card_view:cardCornerRadius="4dp"
|
card_view:cardCornerRadius="4dp"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
card_view:cardPreventCornerOverlap="false"
|
card_view:cardPreventCornerOverlap="false"
|
||||||
card_view:cardUseCompatPadding="true" />
|
card_view:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/track_cover_image_view"
|
||||||
|
android:layout_width="172dp"
|
||||||
|
android:layout_height="172dp" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/title_track_label"
|
android:id="@+id/title_track_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="2"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
|
|
@ -33,7 +41,9 @@
|
||||||
android:id="@+id/album_track_label"
|
android:id="@+id/album_track_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
|
android:maxLines="1"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
|
|
@ -7,25 +7,32 @@
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/card_view"
|
android:id="@+id/card_view"
|
||||||
android:layout_width="172dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="172dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:backgroundTint="@color/cardColor"
|
android:backgroundTint="@color/cardColor"
|
||||||
card_view:cardCornerRadius="4dp"
|
card_view:cardCornerRadius="4dp"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
card_view:cardPreventCornerOverlap="false"
|
card_view:cardPreventCornerOverlap="false"
|
||||||
card_view:cardUseCompatPadding="true" />
|
card_view:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/album_cover_image_view"
|
||||||
|
android:layout_width="172dp"
|
||||||
|
android:layout_height="172dp" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/album_name_label"
|
android:id="@+id/album_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="2"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:text="@string/label_placeholder"
|
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
@ -34,11 +41,12 @@
|
||||||
android:id="@+id/artist_name_label"
|
android:id="@+id/artist_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="1"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:text="@string/label_placeholder"
|
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
@ -1,31 +1,39 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:paddingEnd="8dp">
|
android:paddingEnd="8dp">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/card_view"
|
android:id="@+id/card_view"
|
||||||
android:layout_width="172dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="172dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:backgroundTint="@color/cardColor"
|
android:backgroundTint="@color/cardColor"
|
||||||
card_view:cardCornerRadius="4dp"
|
card_view:cardCornerRadius="4dp"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
card_view:cardPreventCornerOverlap="false"
|
card_view:cardPreventCornerOverlap="false"
|
||||||
card_view:cardUseCompatPadding="true" />
|
card_view:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/artist_cover_image_view"
|
||||||
|
android:layout_width="172dp"
|
||||||
|
android:layout_height="172dp" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/artist_name_label"
|
android:id="@+id/artist_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="1"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingTop="8dp"
|
android:paddingTop="8dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:text="@string/label_placeholder"
|
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
|
||||||
|
|
@ -17,17 +17,24 @@
|
||||||
card_view:cardCornerRadius="4dp"
|
card_view:cardCornerRadius="4dp"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
card_view:cardPreventCornerOverlap="false"
|
card_view:cardPreventCornerOverlap="false"
|
||||||
card_view:cardUseCompatPadding="true" />
|
card_view:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/album_catalogue_cover_image_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/album_name_label"
|
android:id="@+id/album_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="2"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:text="@string/label_placeholder"
|
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
|
@ -38,12 +45,13 @@
|
||||||
android:id="@+id/artist_name_label"
|
android:id="@+id/artist_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="1"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:text="@string/label_placeholder"
|
|
||||||
android:textColor="@color/subtitleTextColor"
|
android:textColor="@color/subtitleTextColor"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
|
||||||
|
|
@ -17,18 +17,25 @@
|
||||||
card_view:cardCornerRadius="4dp"
|
card_view:cardCornerRadius="4dp"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
card_view:cardPreventCornerOverlap="false"
|
card_view:cardPreventCornerOverlap="false"
|
||||||
card_view:cardUseCompatPadding="true" />
|
card_view:cardUseCompatPadding="true">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/artist_catalogue_cover_image_view"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/artist_name_label"
|
android:id="@+id/artist_name_label"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:ellipsize="end"
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
android:fontFamily="@font/open_sans_font_family"
|
||||||
android:maxWidth="172dp"
|
android:maxWidth="172dp"
|
||||||
|
android:maxLines="2"
|
||||||
android:paddingStart="2dp"
|
android:paddingStart="2dp"
|
||||||
android:paddingBottom="16dp"
|
android:paddingBottom="16dp"
|
||||||
android:singleLine="false"
|
android:singleLine="false"
|
||||||
android:text="@string/label_placeholder"
|
|
||||||
android:textColor="@color/titleTextColor"
|
android:textColor="@color/titleTextColor"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout 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="4dp"
|
|
||||||
android:paddingBottom="4dp"
|
|
||||||
android:paddingEnd="4dp">
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:id="@+id/imageView"
|
|
||||||
android:layout_width="52dp"
|
|
||||||
android:layout_height="52dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:backgroundTint="@color/cardColor"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:tint="@color/subtitleTextColor"
|
|
||||||
card_view:cardCornerRadius="4dp"
|
|
||||||
card_view:cardElevation="2dp"
|
|
||||||
card_view:cardPreventCornerOverlap="false"
|
|
||||||
card_view:cardUseCompatPadding="false"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/song_title_text_view"
|
|
||||||
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/song_album_text_view"/>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/song_album_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/song_title_text_view" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/song_duration_text_view"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:fontFamily="@font/open_sans_font_family"
|
|
||||||
android:paddingStart="8dp"
|
|
||||||
android:paddingEnd="8dp"
|
|
||||||
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>
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<LinearLayout 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:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|
@ -7,10 +8,10 @@
|
||||||
android:paddingEnd="4dp"
|
android:paddingEnd="4dp"
|
||||||
android:paddingBottom="2dp">
|
android:paddingBottom="2dp">
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView xmlns:card_view="http://schemas.android.com/apk/res-auto"
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/imageView"
|
android:id="@+id/imageView"
|
||||||
android:layout_width="48dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="48dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center"
|
||||||
android:layout_margin="2dp"
|
android:layout_margin="2dp"
|
||||||
android:backgroundTint="@color/cardColor"
|
android:backgroundTint="@color/cardColor"
|
||||||
|
|
@ -21,7 +22,13 @@
|
||||||
card_view:cardCornerRadius="4dp"
|
card_view:cardCornerRadius="4dp"
|
||||||
card_view:cardElevation="2dp"
|
card_view:cardElevation="2dp"
|
||||||
card_view:cardPreventCornerOverlap="false"
|
card_view:cardPreventCornerOverlap="false"
|
||||||
card_view:cardUseCompatPadding="false" />
|
card_view:cardUseCompatPadding="false">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/song_cover_image_view"
|
||||||
|
android:layout_width="48dp"
|
||||||
|
android:layout_height="48dp" />
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
|
||||||
<item name="colorControlNormal">@color/colorPrimary</item>
|
<item name="colorControlNormal">@color/colorPrimary</item>
|
||||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
<item name="android:navigationBarColor">@color/colorPrimary</item>
|
<item name="android:navigationBarColor">@color/colorPrimary</item>
|
||||||
|
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
<item name="android:windowLightStatusBar">false</item>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
|
||||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
<item name="android:windowLightStatusBar">false</item>
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
|
||||||
<item name="colorControlNormal">@color/colorPrimary</item>
|
<item name="colorControlNormal">@color/colorPrimary</item>
|
||||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
<item name="android:navigationBarColor">@color/colorPrimary</item>
|
<item name="android:navigationBarColor">@color/colorPrimary</item>
|
||||||
|
|
||||||
<item name="android:windowLightStatusBar">true</item>
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,14 @@
|
||||||
<color name="colorAccent">#3700B3</color>
|
<color name="colorAccent">#3700B3</color>
|
||||||
<color name="colorAccentLight">#733ae6</color>
|
<color name="colorAccentLight">#733ae6</color>
|
||||||
|
|
||||||
|
<color name="gradientTitleColor">#FFFFFF</color>
|
||||||
|
<color name="gradientSubtitleColor">#BFBFBF</color>
|
||||||
|
|
||||||
<!-- Ui color -->
|
<!-- Ui color -->
|
||||||
<color name="statusBarColor">#FFFFFF</color>
|
<color name="statusBarColor">#FFFFFF</color>
|
||||||
<color name="navigationBarColor">#FFFFFF</color>
|
<color name="navigationBarColor">#FFFFFF</color>
|
||||||
<color name="navigationDrawerColor">#FFFFFF</color>
|
<color name="navigationDrawerColor">#FFFFFF</color>
|
||||||
|
|
||||||
|
|
||||||
<color name="cardColor">#FFFFFF</color>
|
<color name="cardColor">#FFFFFF</color>
|
||||||
|
|
||||||
<color name="titleTextColor">#252525</color>
|
<color name="titleTextColor">#252525</color>
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,11 @@
|
||||||
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
|
||||||
<item name="colorAccent">@color/colorAccent</item>
|
<item name="colorAccent">@color/colorAccent</item>
|
||||||
|
|
||||||
<item name="android:statusBarColor">@color/colorPrimary</item>
|
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||||
|
|
||||||
<item name="android:windowLightStatusBar">true</item>
|
<item name="android:windowLightStatusBar">true</item>
|
||||||
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
|
||||||
<item name="android:windowTranslucentNavigation">false</item>
|
<item name="android:windowTranslucentNavigation">false</item>
|
||||||
|
|
||||||
<!-- <item name="android:dialogTheme">@style/AppTheme.Dialog</item>-->
|
|
||||||
<!-- <item name="android:alertDialogTheme">@style/AppTheme.Dialog</item>-->
|
|
||||||
<item name="dialogTheme">@style/AppTheme.Dialog</item>
|
<item name="dialogTheme">@style/AppTheme.Dialog</item>
|
||||||
<item name="alertDialogTheme">@style/AppTheme.Dialog</item>
|
<item name="alertDialogTheme">@style/AppTheme.Dialog</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue