Centralization in CustomGlideRequest of the corner rounding setting for images

This commit is contained in:
antonio 2023-03-16 19:47:39 +01:00
parent afa5375675
commit 1ac6ab3e3c
32 changed files with 99 additions and 106 deletions

View file

@ -9,6 +9,9 @@ import com.bumptech.glide.Glide;
import com.bumptech.glide.RequestBuilder; import com.bumptech.glide.RequestBuilder;
import com.bumptech.glide.RequestManager; import com.bumptech.glide.RequestManager;
import com.bumptech.glide.load.engine.DiskCacheStrategy; import com.bumptech.glide.load.engine.DiskCacheStrategy;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.bumptech.glide.request.RequestOptions; import com.bumptech.glide.request.RequestOptions;
import com.bumptech.glide.signature.ObjectKey; import com.bumptech.glide.signature.ObjectKey;
import com.cappielloantonio.play.App; import com.cappielloantonio.play.App;
@ -20,7 +23,8 @@ import java.util.Map;
public class CustomGlideRequest { public class CustomGlideRequest {
private static final String TAG = "CustomGlideRequest"; private static final String TAG = "CustomGlideRequest";
public static final int CORNER_RADIUS = 12; public static final int CORNER_RADIUS = Preferences.isCornerRoundingEnabled() ? Preferences.getRoundedCornerSize() : 1;
//public static final int CORNER_RADIUS = 12;
public static final DiskCacheStrategy DEFAULT_DISK_CACHE_STRATEGY = DiskCacheStrategy.ALL; public static final DiskCacheStrategy DEFAULT_DISK_CACHE_STRATEGY = DiskCacheStrategy.ALL;
@ -31,7 +35,7 @@ public class CustomGlideRequest {
.error(new ColorDrawable(SurfaceColors.SURFACE_5.getColor(context))) .error(new ColorDrawable(SurfaceColors.SURFACE_5.getColor(context)))
.diskCacheStrategy(DEFAULT_DISK_CACHE_STRATEGY) .diskCacheStrategy(DEFAULT_DISK_CACHE_STRATEGY)
.signature(new ObjectKey(item != null ? item : 0)) .signature(new ObjectKey(item != null ? item : 0))
.centerCrop(); .transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS));
} }
public static String createUrl(String item, int size) { public static String createUrl(String item, int size) {
@ -83,7 +87,9 @@ public class CustomGlideRequest {
} }
public RequestBuilder<Drawable> build() { public RequestBuilder<Drawable> build() {
return requestManager.load(item); return requestManager
.load(item)
.transition(DrawableTransitionOptions.withCrossFade());
} }
} }
} }

View file

@ -47,8 +47,6 @@ public class AlbumAdapter extends RecyclerView.Adapter<AlbumAdapter.ViewHolder>
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), album.getCoverArtId()) .from(holder.itemView.getContext(), album.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.albumCoverImageView); .into(holder.item.albumCoverImageView);
} }

View file

@ -47,8 +47,6 @@ public class AlbumArtistPageOrSimilarAdapter extends RecyclerView.Adapter<AlbumA
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), album.getCoverArtId()) .from(holder.itemView.getContext(), album.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.artistPageAlbumCoverImageView); .into(holder.item.artistPageAlbumCoverImageView);
} }

View file

@ -82,8 +82,6 @@ public class AlbumCatalogueAdapter extends RecyclerView.Adapter<AlbumCatalogueAd
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), album.getCoverArtId()) .from(holder.itemView.getContext(), album.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.albumCatalogueCoverImageView); .into(holder.item.albumCatalogueCoverImageView);
} }

View file

@ -49,8 +49,6 @@ public class AlbumHorizontalAdapter extends RecyclerView.Adapter<AlbumHorizontal
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), album.getCoverArtId()) .from(holder.itemView.getContext(), album.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.albumCoverImageView); .into(holder.item.albumCoverImageView);
} }

View file

@ -52,8 +52,6 @@ public class ArtistAdapter extends RecyclerView.Adapter<ArtistAdapter.ViewHolder
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), artist.getCoverArtId()) .from(holder.itemView.getContext(), artist.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.artistCoverImageView); .into(holder.item.artistCoverImageView);
} }

View file

@ -82,8 +82,6 @@ public class ArtistCatalogueAdapter extends RecyclerView.Adapter<ArtistCatalogue
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), artist.getCoverArtId()) .from(holder.itemView.getContext(), artist.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.artistCatalogueCoverImageView); .into(holder.item.artistCatalogueCoverImageView);
} }

View file

@ -53,8 +53,6 @@ public class ArtistHorizontalAdapter extends RecyclerView.Adapter<ArtistHorizont
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), artist.getCoverArtId()) .from(holder.itemView.getContext(), artist.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.artistCoverImageView); .into(holder.item.artistCoverImageView);
} }

View file

@ -46,8 +46,6 @@ public class ArtistSimilarAdapter extends RecyclerView.Adapter<ArtistSimilarAdap
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), artist.getCoverArtId()) .from(holder.itemView.getContext(), artist.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.similarArtistCoverImageView); .into(holder.item.similarArtistCoverImageView);
} }

View file

@ -8,6 +8,8 @@ import android.view.animation.AccelerateDecelerateInterpolator;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions; import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions;
import com.cappielloantonio.play.databinding.ItemHomeDiscoverSongBinding; import com.cappielloantonio.play.databinding.ItemHomeDiscoverSongBinding;
import com.cappielloantonio.play.glide.CustomGlideRequest; import com.cappielloantonio.play.glide.CustomGlideRequest;
@ -46,7 +48,6 @@ public class DiscoverSongAdapter extends RecyclerView.Adapter<DiscoverSongAdapte
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), song.getCoverArtId()) .from(holder.itemView.getContext(), song.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.into(holder.item.discoverSongCoverImageView); .into(holder.item.discoverSongCoverImageView);
} }

View file

@ -44,8 +44,6 @@ public class GridTrackAdapter extends RecyclerView.Adapter<GridTrackAdapter.View
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), item.getCoverArtId()) .from(holder.itemView.getContext(), item.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.trackCoverImageView); .into(holder.item.trackCoverImageView);
} }

View file

@ -53,8 +53,6 @@ public class PlayerSongQueueAdapter extends RecyclerView.Adapter<PlayerSongQueue
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), song.getCoverArtId()) .from(holder.itemView.getContext(), song.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.queueSongCoverImageView); .into(holder.item.queueSongCoverImageView);
MediaManager.getCurrentIndex(mediaBrowserListenableFuture, index -> { MediaManager.getCurrentIndex(mediaBrowserListenableFuture, index -> {

View file

@ -42,8 +42,6 @@ public class PlaylistDialogSongHorizontalAdapter extends RecyclerView.Adapter<Pl
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), song.getCoverArtId()) .from(holder.itemView.getContext(), song.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.playlistDialogSongCoverImageView); .into(holder.item.playlistDialogSongCoverImageView);
} }

View file

@ -84,8 +84,6 @@ public class PlaylistHorizontalAdapter extends RecyclerView.Adapter<PlaylistHori
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), playlist.getCoverArtId()) .from(holder.itemView.getContext(), playlist.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.playlistCoverImageView); .into(holder.item.playlistCoverImageView);
} }

View file

@ -52,8 +52,6 @@ public class PodcastEpisodeAdapter extends RecyclerView.Adapter<PodcastEpisodeAd
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), podcastEpisode.getCoverArtId()) .from(holder.itemView.getContext(), podcastEpisode.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.podcastCoverImageView); .into(holder.item.podcastCoverImageView);
} }

View file

@ -46,8 +46,6 @@ public class SimilarTrackAdapter extends RecyclerView.Adapter<SimilarTrackAdapte
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(holder.itemView.getContext(), song.getCoverArtId()) .from(holder.itemView.getContext(), song.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.trackCoverImageView); .into(holder.item.trackCoverImageView);
} }

View file

@ -63,8 +63,6 @@ public class SongHorizontalAdapter extends RecyclerView.Adapter<SongHorizontalAd
if (isCoverVisible) CustomGlideRequest.Builder if (isCoverVisible) CustomGlideRequest.Builder
.from(holder.itemView.getContext(), song.getCoverArtId()) .from(holder.itemView.getContext(), song.getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(holder.item.songCoverImageView); .into(holder.item.songCoverImageView);
if (isCoverVisible) holder.item.trackNumberTextView.setVisibility(View.INVISIBLE); if (isCoverVisible) holder.item.trackNumberTextView.setVisibility(View.INVISIBLE);

View file

@ -177,8 +177,6 @@ public class AlbumPageFragment extends Fragment implements ClickCallback {
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), albumPageViewModel.getAlbum().getCoverArtId()) .from(requireContext(), albumPageViewModel.getAlbum().getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(bind.albumCoverImageView); .into(bind.albumCoverImageView);
} }

View file

@ -122,7 +122,6 @@ public class ArtistPageFragment extends Fragment implements ClickCallback {
if (getContext() != null && bind != null) CustomGlideRequest.Builder if (getContext() != null && bind != null) CustomGlideRequest.Builder
.from(requireContext(), artistPageViewModel.getArtist().getId()) .from(requireContext(), artistPageViewModel.getArtist().getId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.into(bind.artistBackdropImageView); .into(bind.artistBackdropImageView);
if (bind != null) bind.bioTextView.setText(normalizedBio); if (bind != null) bind.bioTextView.setText(normalizedBio);

View file

@ -160,8 +160,6 @@ public class PlayerBottomSheetFragment extends Fragment {
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), mediaMetadata.extras.getString("coverArtId")) .from(requireContext(), mediaMetadata.extras.getString("coverArtId"))
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(bind.playerHeaderLayout.playerHeaderMediaCoverImage); .into(bind.playerHeaderLayout.playerHeaderMediaCoverImage);
} }
} }

View file

@ -171,7 +171,6 @@ public class PlayerCoverFragment extends Fragment {
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), mediaMetadata.extras != null ? mediaMetadata.extras.getString("coverArtId") : null) .from(requireContext(), mediaMetadata.extras != null ? mediaMetadata.extras.getString("coverArtId") : null)
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.into(bind.nowPlayingSongCoverImageView); .into(bind.nowPlayingSongCoverImageView);
} }
} }

View file

@ -166,7 +166,6 @@ public class PlaylistPageFragment extends Fragment implements ClickCallback {
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), playlistPageViewModel.getPlaylist().getCoverArtId()) .from(requireContext(), playlistPageViewModel.getPlaylist().getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.into(bind.playlistCoverImageView); .into(bind.playlistCoverImageView);
} }

View file

@ -84,8 +84,6 @@ public class AlbumBottomSheetDialog extends BottomSheetDialogFragment implements
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), albumBottomSheetViewModel.getAlbum().getCoverArtId()) .from(requireContext(), albumBottomSheetViewModel.getAlbum().getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(coverAlbum); .into(coverAlbum);
TextView titleAlbum = view.findViewById(R.id.album_title_text_view); TextView titleAlbum = view.findViewById(R.id.album_title_text_view);

View file

@ -75,8 +75,6 @@ public class ArtistBottomSheetDialog extends BottomSheetDialogFragment implement
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), artistBottomSheetViewModel.getArtist().getCoverArtId()) .from(requireContext(), artistBottomSheetViewModel.getArtist().getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(coverArtist); .into(coverArtist);
TextView nameArtist = view.findViewById(R.id.song_title_text_view); TextView nameArtist = view.findViewById(R.id.song_title_text_view);

View file

@ -70,8 +70,6 @@ public class PodcastBottomSheetDialog extends BottomSheetDialogFragment implemen
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), podcastBottomSheetViewModel.getPodcast().getCoverArtId()) .from(requireContext(), podcastBottomSheetViewModel.getPodcast().getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(coverPodcast); .into(coverPodcast);
TextView titlePodcast = view.findViewById(R.id.podcast_title_text_view); TextView titlePodcast = view.findViewById(R.id.podcast_title_text_view);

View file

@ -79,8 +79,6 @@ public class SongBottomSheetDialog extends BottomSheetDialogFragment implements
CustomGlideRequest.Builder CustomGlideRequest.Builder
.from(requireContext(), songBottomSheetViewModel.getSong().getCoverArtId()) .from(requireContext(), songBottomSheetViewModel.getSong().getCoverArtId())
.build() .build()
.transition(DrawableTransitionOptions.withCrossFade())
.transform(new CenterCrop(), new RoundedCorners(CustomGlideRequest.CORNER_RADIUS))
.into(coverSong); .into(coverSong);
TextView titleSong = view.findViewById(R.id.song_title_text_view); TextView titleSong = view.findViewById(R.id.song_title_text_view);

View file

@ -25,6 +25,8 @@ object Preferences {
private const val SYNC_STARRED_TRACKS_FOR_OFFLINE_USE = "sync_starred_tracks_for_offline_use" private const val SYNC_STARRED_TRACKS_FOR_OFFLINE_USE = "sync_starred_tracks_for_offline_use"
private const val QUEUE_SYNCING = "queue_syncing" private const val QUEUE_SYNCING = "queue_syncing"
private const val QUEUE_SYNCING_COUNTDOWN = "queue_syncing_countdown" private const val QUEUE_SYNCING_COUNTDOWN = "queue_syncing_countdown"
private const val ROUNDED_CORNER = "rounded_corner"
private const val ROUNDED_CORNER_SIZE = "rounded_corner_size"
@JvmStatic @JvmStatic
fun getServer(): String? { fun getServer(): String? {
@ -195,4 +197,14 @@ object Preferences {
fun getSyncCountdownTimer(): Int { fun getSyncCountdownTimer(): Int {
return App.getInstance().preferences.getString(QUEUE_SYNCING_COUNTDOWN, "5")!!.toInt() return App.getInstance().preferences.getString(QUEUE_SYNCING_COUNTDOWN, "5")!!.toInt()
} }
@JvmStatic
fun isCornerRoundingEnabled(): Boolean {
return App.getInstance().preferences.getBoolean(ROUNDED_CORNER, false)
}
@JvmStatic
fun getRoundedCornerSize(): Int {
return App.getInstance().preferences.getString(ROUNDED_CORNER_SIZE, "12")!!.toInt()
}
} }

View file

@ -155,7 +155,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="212dp" android:layout_height="212dp"
android:clipToPadding="false" android:clipToPadding="false"
android:paddingBottom="8dp" /> android:paddingTop="8dp"
android:paddingBottom="16dp" />
</LinearLayout> </LinearLayout>
<include <include

View file

@ -1,56 +1,41 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView 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"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginStart="16dp" android:paddingHorizontal="16dp">
android:layout_marginTop="8dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
app:cardCornerRadius="4dp">
<ImageView <ImageView
android:id="@+id/discover_song_cover_image_view" android:id="@+id/discover_song_cover_image_view"
android:layout_width="match_parent"
android:layout_height="196dp" />
<View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="196dp" android:layout_height="196dp"
android:background="@drawable/gradient_discover_background_image" /> android:foreground="@drawable/gradient_discover_background_image" />
<RelativeLayout <TextView
android:layout_width="match_parent" android:id="@+id/title_discover_song_label"
android:layout_height="196dp"> android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="16dp"
android:layout_marginTop="18dp"
android:layout_marginRight="16dp"
android:ellipsize="end"
android:fontFamily="@font/inter"
android:maxLines="2"
android:textColor="@color/gradientTitleColor"
android:textFontWeight="400"
android:textSize="20sp" />
<TextView <TextView
android:id="@+id/title_discover_song_label" android:id="@+id/album_discover_song_label"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginLeft="16dp" android:layout_below="@id/title_discover_song_label"
android:layout_marginTop="18dp" android:layout_marginLeft="16dp"
android:layout_marginRight="16dp" android:layout_marginRight="16dp"
android:ellipsize="end" android:drawablePadding="10dp"
android:fontFamily="@font/inter" android:ellipsize="end"
android:maxLines="2" android:fontFamily="@font/inter"
android:textColor="@color/gradientTitleColor" android:maxLines="1"
android:textFontWeight="400" android:textColor="@color/gradientSubtitleColor"
android:textSize="20sp" /> android:textFontWeight="400"
android:textSize="14sp" />
<TextView </RelativeLayout>
android:id="@+id/album_discover_song_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/title_discover_song_label"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:drawablePadding="10dp"
android:ellipsize="end"
android:fontFamily="@font/inter"
android:maxLines="1"
android:textColor="@color/gradientSubtitleColor"
android:textFontWeight="400"
android:textSize="14sp" />
</RelativeLayout>
</androidx.cardview.widget.CardView>

View file

@ -130,4 +130,15 @@
<item>5</item> <item>5</item>
<item>2</item> <item>2</item>
</string-array> </string-array>
<string-array name="rounded_corner_size_titles">
<item>High</item>
<item>Medium</item>
<item>Low</item>
</string-array>
<string-array name="rounded_corner_size_values">
<item>18</item>
<item>12</item>
<item>6</item>
</string-array>
</resources> </resources>

View file

@ -159,6 +159,10 @@
<string name="settings_queue_syncing_title">Sync play queue for this user</string> <string name="settings_queue_syncing_title">Sync play queue for this user</string>
<string name="settings_queue_syncing_countdown">Sync timer</string> <string name="settings_queue_syncing_countdown">Sync timer</string>
<string name="settings_queue_syncing_summary">If enabled, the user will have the ability to save their play queue and will have the ability to load state when opening the application.</string> <string name="settings_queue_syncing_summary">If enabled, the user will have the ability to save their play queue and will have the ability to load state when opening the application.</string>
<string name="settings_rounded_corner">Rounded corners</string>
<string name="settings_rounded_corner_summary">If enabled, sets a curvature angle for all rendered covers. The changes will take effect on restart.</string>
<string name="settings_rounded_corner_size">Corners size</string>
<string name="settings_rounded_corner_size_summary">Sets the magnitude of the curvature angle.</string>
<string name="settings_scan_title">Scan library</string> <string name="settings_scan_title">Scan library</string>
<string name="settings_summary_syncing">Returns the state of the play queue for this user. This includes the tracks in the play queue, the currently playing track, and the position within this track. The server must support this feature.</string> <string name="settings_summary_syncing">Returns the state of the play queue for this user. This includes the tracks in the play queue, the currently playing track, and the position within this track. The server must support this feature.</string>
<string name="settings_summary_transcoding">Priority given to the transcoding mode. If set to \"Direct play\" the bitrate of the file will not be changed.</string> <string name="settings_summary_transcoding">Priority given to the transcoding mode. If set to \"Direct play\" the bitrate of the file will not be changed.</string>
@ -169,10 +173,11 @@
<string name="settings_title_general">General</string> <string name="settings_title_general">General</string>
<string name="settings_title_syncing">Syncing</string> <string name="settings_title_syncing">Syncing</string>
<string name="settings_title_transcoding">Transcoding</string> <string name="settings_title_transcoding">Transcoding</string>
<string name="settings_title_ui">UI</string>
<string name="settings_version_summary">3.1.0</string> <string name="settings_version_summary">3.1.0</string>
<string name="settings_version_title">Version</string> <string name="settings_version_title">Version</string>
<string name="settings_wifi_only_title">Stream via Wi-Fi only alert</string> <string name="settings_wifi_only_title">Stream via Wi-Fi only alert</string>
<string name="settings_wifi_only_summary">Ask for user confirmation before streaming over mobile network</string> <string name="settings_wifi_only_summary">Ask for user confirmation before streaming over mobile network.</string>
<string name="song_bottom_sheet_add_to_playlist">Add to playlist</string> <string name="song_bottom_sheet_add_to_playlist">Add to playlist</string>
<string name="song_bottom_sheet_add_to_queue">Add to queue</string> <string name="song_bottom_sheet_add_to_queue">Add to queue</string>
<string name="song_bottom_sheet_download">Download</string> <string name="song_bottom_sheet_download">Download</string>

View file

@ -1,15 +1,6 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android" <PreferenceScreen 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">
<PreferenceCategory app:title="@string/settings_title_general"> <PreferenceCategory app:title="@string/settings_title_general">
<ListPreference
app:defaultValue="default"
app:dialogTitle="@string/settings_theme"
app:entries="@array/theme_list_titles"
app:entryValues="@array/theme_list_values"
app:key="theme"
app:title="@string/settings_theme"
app:useSimpleSummaryProvider="true" />
<Preference <Preference
android:key="equalizer" android:key="equalizer"
android:title="@string/settings_equalizer_title" android:title="@string/settings_equalizer_title"
@ -24,6 +15,32 @@
android:title="@string/settings_logout_title"/> android:title="@string/settings_logout_title"/>
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory app:title="@string/settings_title_ui">
<ListPreference
app:defaultValue="default"
app:dialogTitle="@string/settings_theme"
app:entries="@array/theme_list_titles"
app:entryValues="@array/theme_list_values"
app:key="theme"
app:title="@string/settings_theme"
app:useSimpleSummaryProvider="true" />
<SwitchPreference
android:title="@string/settings_rounded_corner"
android:defaultValue="true"
android:summary="@string/settings_rounded_corner_summary"
android:key="rounded_corner" />
<ListPreference
app:defaultValue="6"
app:dialogTitle="@string/settings_rounded_corner_size"
app:entries="@array/rounded_corner_size_titles"
app:entryValues="@array/rounded_corner_size_values"
app:key="rounded_corner_size"
app:title="@string/settings_rounded_corner_size"
app:useSimpleSummaryProvider="true" />
</PreferenceCategory>
<PreferenceCategory app:title="@string/settings_title_data"> <PreferenceCategory app:title="@string/settings_title_data">
<ListPreference <ListPreference
app:defaultValue="500" app:defaultValue="500"