diff --git a/app/build.gradle b/app/build.gradle index 02e53670b..67aa4aa09 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,7 +1,7 @@ apply plugin: "com.android.application" apply plugin: "kotlin-android" apply plugin: "kotlin-kapt" -apply plugin: "androidx.navigation.safeargs" +apply plugin: "androidx.navigation.safeargs.kotlin" android { compileSdkVersion 30 diff --git a/app/src/main/res/layout-land/fragment_compact_playback.xml b/app/src/main/res/layout-land/fragment_compact_playback.xml index 79e2aee90..79d25815d 100644 --- a/app/src/main/res/layout-land/fragment_compact_playback.xml +++ b/app/src/main/res/layout-land/fragment_compact_playback.xml @@ -28,9 +28,9 @@ android:id="@+id/playback_cover" android:layout_width="@dimen/size_cover_compact" android:layout_height="@dimen/size_cover_compact" - android:layout_marginStart="@dimen/margin_small" - android:layout_marginTop="@dimen/margin_small" - android:layout_marginBottom="@dimen/margin_small" + android:layout_marginStart="@dimen/spacing_small" + android:layout_marginTop="@dimen/spacing_small" + android:layout_marginBottom="@dimen/spacing_small" android:contentDescription="@{@string/description_album_cover(song.name)}" app:albumArt="@{song}" app:layout_constraintBottom_toBottomOf="parent" @@ -43,8 +43,8 @@ android:id="@+id/playback_song" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_small" - android:layout_marginEnd="@dimen/margin_mid_small" + android:layout_marginStart="@dimen/spacing_small" + android:layout_marginEnd="@dimen/spacing_small" android:ellipsize="end" android:fontFamily="@font/inter_semibold" android:singleLine="true" @@ -62,8 +62,8 @@ android:id="@+id/playback_info" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_small" - android:layout_marginEnd="@dimen/margin_mid_small" + android:layout_marginStart="@dimen/spacing_small" + android:layout_marginEnd="@dimen/spacing_small" android:ellipsize="end" android:singleLine="true" android:text="@{@string/format_info(song.album.artist.name, song.album.name)}" @@ -80,7 +80,7 @@ style="@style/Widget.AppCompat.Button.Borderless" android:layout_width="@dimen/size_play_pause_compact" android:layout_height="@dimen/size_play_pause_compact" - android:layout_marginEnd="@dimen/margin_mid_small" + android:layout_marginEnd="@dimen/spacing_small" android:background="@drawable/ui_unbounded_ripple" android:contentDescription="@string/description_play_pause" android:onClick="@{() -> playbackModel.invertPlayingStatus()}" diff --git a/app/src/main/res/layout-land/fragment_playback.xml b/app/src/main/res/layout-land/fragment_playback.xml index e7e34f079..c569f9c84 100644 --- a/app/src/main/res/layout-land/fragment_playback.xml +++ b/app/src/main/res/layout-land/fragment_playback.xml @@ -40,7 +40,7 @@ android:id="@+id/playback_cover" android:layout_width="0dp" android:layout_height="0dp" - android:layout_margin="@dimen/margin_large" + android:layout_margin="@dimen/spacing_large" android:contentDescription="@{@string/description_album_cover(song.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -57,8 +57,8 @@ android:id="@+id/playback_song_container" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" app:layout_constraintBottom_toTopOf="@+id/playback_artist" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0" @@ -86,8 +86,8 @@ android:id="@+id/playback_artist" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" android:ellipsize="end" android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album.artist)}" android:singleLine="true" @@ -105,8 +105,8 @@ android:id="@+id/playback_album" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" android:ellipsize="end" android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}" android:singleLine="true" @@ -124,11 +124,11 @@ android:id="@+id/playback_seek_bar" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/margin_medium" + android:layout_marginTop="@dimen/spacing_medium" android:clickable="true" android:focusable="true" - android:paddingStart="@dimen/margin_mid_large" - android:paddingEnd="@dimen/margin_mid_large" + android:paddingStart="@dimen/spacing_mid_large" + android:paddingEnd="@dimen/spacing_mid_large" android:progressBackgroundTint="?android:attr/colorControlNormal" android:progressTint="?attr/colorPrimary" android:splitTrack="false" @@ -144,7 +144,7 @@ android:id="@+id/playback_duration_current" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" android:text="@{playbackModel.formattedPosition}" app:layout_constraintBottom_toTopOf="@+id/playback_play_pause" app:layout_constraintStart_toEndOf="@+id/playback_cover" @@ -155,7 +155,7 @@ android:id="@+id/playback_song_duration" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" android:text="@{song.formattedDuration}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar" @@ -164,7 +164,7 @@ diff --git a/app/src/main/res/layout-land/item_genre_header.xml b/app/src/main/res/layout-land/item_genre_header.xml index c36f26ed9..29b51800c 100644 --- a/app/src/main/res/layout-land/item_genre_header.xml +++ b/app/src/main/res/layout-land/item_genre_header.xml @@ -27,7 +27,7 @@ android:id="@+id/genre_image" android:layout_width="@dimen/size_cover_detail_land" android:layout_height="@dimen/size_cover_detail_land" - android:layout_margin="@dimen/margin_medium" + android:layout_margin="@dimen/spacing_medium" android:contentDescription="@{@string/description_genre_image(genre.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -41,8 +41,8 @@ style="@style/DetailTitleText" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" - android:layout_marginEnd="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" + android:layout_marginEnd="@dimen/spacing_medium" android:text="@{genre.resolvedName}" app:layout_constraintBottom_toTopOf="@+id/genre_song_count" app:layout_constraintEnd_toEndOf="parent" @@ -56,7 +56,7 @@ android:id="@+id/genre_song_count" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:text="@{@plurals/format_song_count(genre.songs.size(), genre.songs.size())}" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" @@ -90,7 +90,7 @@ android:id="@+id/genre_duration" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:text="@{genre.totalDuration}" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" @@ -102,7 +102,7 @@ diff --git a/app/src/main/res/layout-large/item_album_header.xml b/app/src/main/res/layout-large/item_album_header.xml index 1052a0aeb..d37f92b9e 100644 --- a/app/src/main/res/layout-large/item_album_header.xml +++ b/app/src/main/res/layout-large/item_album_header.xml @@ -27,8 +27,8 @@ android:id="@+id/album_cover" android:layout_width="@dimen/size_cover_detail" android:layout_height="@dimen/size_cover_detail" - android:layout_marginStart="@dimen/margin_medium" - android:layout_marginTop="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" + android:layout_marginTop="@dimen/spacing_medium" android:contentDescription="@{@string/description_album_cover(album.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -42,8 +42,8 @@ style="@style/DetailTitleText" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" - android:layout_marginEnd="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" + android:layout_marginEnd="@dimen/spacing_medium" android:text="@{album.name}" app:layout_constraintBottom_toTopOf="@+id/album_artist" app:layout_constraintEnd_toEndOf="parent" @@ -57,7 +57,7 @@ android:id="@+id/album_artist" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:clickable="true" android:focusable="true" android:onClick="@{() -> detailModel.navToItem(album.artist)}" @@ -73,7 +73,7 @@ android:id="@+id/album_details" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" app:albumDetails="@{album}" diff --git a/app/src/main/res/layout-large/item_artist_header.xml b/app/src/main/res/layout-large/item_artist_header.xml index b3b22edbd..8a4a7a06c 100644 --- a/app/src/main/res/layout-large/item_artist_header.xml +++ b/app/src/main/res/layout-large/item_artist_header.xml @@ -27,7 +27,7 @@ android:id="@+id/artist_image" android:layout_width="@dimen/size_cover_detail" android:layout_height="@dimen/size_cover_detail" - android:layout_margin="@dimen/margin_medium" + android:layout_margin="@dimen/spacing_medium" android:contentDescription="@{@string/description_artist_image(artist.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -41,8 +41,8 @@ style="@style/DetailTitleText" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" - android:layout_marginEnd="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" + android:layout_marginEnd="@dimen/spacing_medium" android:text="@{artist.name}" app:layout_constraintBottom_toTopOf="@+id/artist_genre" app:layout_constraintEnd_toEndOf="parent" @@ -56,7 +56,7 @@ android:id="@+id/artist_genre" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" app:artistGenre="@{artist}" @@ -69,7 +69,7 @@ android:id="@+id/artist_counts" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" app:artistCounts="@{artist}" @@ -102,7 +102,7 @@ diff --git a/app/src/main/res/layout-large/item_genre_header.xml b/app/src/main/res/layout-large/item_genre_header.xml index 6480cd803..661e83e16 100644 --- a/app/src/main/res/layout-large/item_genre_header.xml +++ b/app/src/main/res/layout-large/item_genre_header.xml @@ -27,7 +27,7 @@ android:id="@+id/genre_image" android:layout_width="@dimen/size_cover_detail" android:layout_height="@dimen/size_cover_detail" - android:layout_margin="@dimen/margin_medium" + android:layout_margin="@dimen/spacing_medium" android:contentDescription="@{@string/description_genre_image(genre.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -41,8 +41,8 @@ style="@style/DetailTitleText" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" - android:layout_marginEnd="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" + android:layout_marginEnd="@dimen/spacing_medium" android:text="@{genre.resolvedName}" app:layout_constraintBottom_toTopOf="@+id/genre_song_count" app:layout_constraintEnd_toEndOf="parent" @@ -56,7 +56,7 @@ android:id="@+id/genre_song_count" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:text="@{@plurals/format_song_count(genre.songs.size(), genre.songs.size())}" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" @@ -90,7 +90,7 @@ android:id="@+id/genre_duration" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:text="@{genre.totalDuration}" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" @@ -102,7 +102,7 @@ diff --git a/app/src/main/res/layout-xlarge-land/fragment_playback.xml b/app/src/main/res/layout-xlarge-land/fragment_playback.xml index bc3f99ec3..772141a01 100644 --- a/app/src/main/res/layout-xlarge-land/fragment_playback.xml +++ b/app/src/main/res/layout-xlarge-land/fragment_playback.xml @@ -40,9 +40,9 @@ android:id="@+id/playback_cover" android:layout_width="0dp" android:layout_height="0dp" - android:layout_marginStart="@dimen/margin_large" - android:layout_marginTop="@dimen/margin_insane" - android:layout_marginBottom="@dimen/margin_insane" + android:layout_marginStart="@dimen/spacing_large" + android:layout_marginTop="@dimen/spacing_insane" + android:layout_marginBottom="@dimen/spacing_insane" android:contentDescription="@{@string/description_album_cover(song.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -59,8 +59,8 @@ android:id="@+id/playback_song_container" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" app:layout_constraintBottom_toTopOf="@+id/playback_artist" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0" @@ -88,8 +88,8 @@ android:id="@+id/playback_artist" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" android:ellipsize="end" android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album.artist)}" android:singleLine="true" @@ -107,8 +107,8 @@ android:id="@+id/playback_album" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" android:ellipsize="end" android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}" android:singleLine="true" @@ -126,11 +126,11 @@ android:id="@+id/playback_seek_bar" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/margin_medium" + android:layout_marginTop="@dimen/spacing_medium" android:clickable="true" android:focusable="true" - android:paddingStart="@dimen/margin_mid_large" - android:paddingEnd="@dimen/margin_mid_large" + android:paddingStart="@dimen/spacing_mid_large" + android:paddingEnd="@dimen/spacing_mid_large" android:progressBackgroundTint="?android:attr/colorControlNormal" android:progressTint="?attr/colorPrimary" android:splitTrack="false" @@ -146,7 +146,7 @@ android:id="@+id/playback_duration_current" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_mid_large" + android:layout_marginStart="@dimen/spacing_mid_large" android:text="@{playbackModel.formattedPosition}" app:layout_constraintBottom_toTopOf="@+id/playback_play_pause" app:layout_constraintStart_toEndOf="@+id/playback_cover" @@ -157,7 +157,7 @@ android:id="@+id/playback_song_container_duration" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginEnd="@dimen/margin_mid_large" + android:layout_marginEnd="@dimen/spacing_mid_large" android:text="@{song.formattedDuration}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@+id/playback_seek_bar" @@ -166,7 +166,7 @@ + android:padding="@dimen/spacing_small"> + android:paddingBottom="@dimen/spacing_tiny" /> diff --git a/app/src/main/res/layout/item_accent.xml b/app/src/main/res/layout/item_accent.xml index 5c0d1dcca..2e433e638 100644 --- a/app/src/main/res/layout/item_accent.xml +++ b/app/src/main/res/layout/item_accent.xml @@ -6,7 +6,7 @@ + android:padding="@dimen/spacing_small"> diff --git a/app/src/main/res/layout/item_blacklist_entry.xml b/app/src/main/res/layout/item_blacklist_entry.xml index f13790bfb..ace6a7938 100644 --- a/app/src/main/res/layout/item_blacklist_entry.xml +++ b/app/src/main/res/layout/item_blacklist_entry.xml @@ -12,7 +12,7 @@ android:id="@+id/blacklist_title" style="@style/ItemText.Primary" android:layout_marginStart="0dp" - android:layout_marginEnd="@dimen/margin_medium" + android:layout_marginEnd="@dimen/spacing_medium" android:maxLines="@null" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/blacklist_clear" diff --git a/app/src/main/res/layout/item_genre_header.xml b/app/src/main/res/layout/item_genre_header.xml index e0de49144..0aceea0e2 100644 --- a/app/src/main/res/layout/item_genre_header.xml +++ b/app/src/main/res/layout/item_genre_header.xml @@ -28,7 +28,7 @@ android:id="@+id/genre_image" android:layout_width="@dimen/size_cover_detail" android:layout_height="@dimen/size_cover_detail" - android:layout_marginTop="@dimen/margin_medium" + android:layout_marginTop="@dimen/spacing_medium" android:contentDescription="@{@string/description_genre_image(genre.name)}" android:elevation="@dimen/elevation_normal" android:outlineProvider="bounds" @@ -43,9 +43,9 @@ style="@style/DetailTitleText" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" - android:layout_marginTop="@dimen/margin_medium" - android:layout_marginEnd="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" + android:layout_marginTop="@dimen/spacing_medium" + android:layout_marginEnd="@dimen/spacing_medium" android:text="@{genre.resolvedName}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.5" @@ -57,7 +57,7 @@ android:id="@+id/genre_song_count" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:text="@{@plurals/format_song_count(genre.songs.size(), genre.songs.size())}" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" @@ -69,7 +69,7 @@ android:id="@+id/genre_duration" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="@dimen/margin_medium" + android:layout_marginStart="@dimen/spacing_medium" android:text="@{genre.totalDuration}" android:textAppearance="?android:attr/textAppearanceListItem" android:textColor="?android:attr/textColorSecondary" @@ -100,7 +100,7 @@ diff --git a/app/src/main/res/layout/item_genre_song.xml b/app/src/main/res/layout/item_genre_song.xml index 14fcceca6..9f2d70daa 100644 --- a/app/src/main/res/layout/item_genre_song.xml +++ b/app/src/main/res/layout/item_genre_song.xml @@ -27,7 +27,7 @@ + android:padding="@dimen/spacing_medium"> @font/inter_semibold false 0dp - @dimen/padding_small + @dimen/spacing_small @dimen/text_size_material_button \ No newline at end of file diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 2ec27ca23..93f6e6c54 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -1,20 +1,14 @@ - - 2dp - 4dp - 8dp - 12dp - 16dp - - - 8dp - 10dp - 16dp - 24dp - 32dp - 48dp - 128dp + + 2dp + 4dp + 8dp + 16dp + 24dp + 32dp + 48dp + 128dp 2dp @@ -32,7 +26,7 @@ 18dp 24dp - 44dp + 46dp 56dp 68dp 260dp diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 760507313..580cd2c9f 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -149,7 +149,7 @@ match_parent wrap_content @drawable/ui_ripple - @dimen/padding_medium + @dimen/spacing_medium true true @@ -161,7 +161,7 @@ wrap_content end 1 - @dimen/margin_medium + @dimen/spacing_medium @@ -180,10 +180,10 @@ @@ -228,17 +228,17 @@ @@ -261,10 +261,10 @@ @drawable/ui_circle_ripple ?attr/colorPrimary ?android:attr/windowBackground - @dimen/margin_large - @dimen/margin_medium - @dimen/margin_large + @dimen/spacing_large + @dimen/spacing_medium + @dimen/spacing_large fitCenter - @dimen/padding_medium + @dimen/spacing_medium \ No newline at end of file