Refactor margin/padding

Do two things to the margin and padding system:
- Remove the redundant padding/margin dimens and replace it with a unified "spacing" dimen namespace
- Make most margin and padding dimens follow the divisible-by-8 rule in material design
This commit is contained in:
OxygenCobalt 2021-04-25 14:59:21 -06:00
parent 39f26b4feb
commit 029a4b1ff6
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47
30 changed files with 212 additions and 218 deletions

View file

@ -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

View file

@ -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()}"

View file

@ -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 @@
<ImageButton
android:id="@+id/playback_loop"
style="@style/Widget.Button.Unbounded"
android:layout_marginStart="@dimen/margin_mid_small"
android:layout_marginStart="@dimen/spacing_small"
android:contentDescription="@string/description_change_loop"
android:onClick="@{() -> playbackModel.incrementLoopStatus()}"
android:src="@drawable/ic_loop"
@ -211,7 +211,7 @@
<ImageButton
android:id="@+id/playback_shuffle"
style="@style/Widget.Button.Unbounded"
android:layout_marginEnd="@dimen/margin_mid_small"
android:layout_marginEnd="@dimen/spacing_small"
android:background="@drawable/ui_unbounded_ripple"
android:contentDescription="@{playbackModel.isShuffling() ? @string/description_shuffle_off : @string/description_shuffle_on"
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"

View file

@ -27,8 +27,8 @@
android:id="@+id/album_cover"
android:layout_width="@dimen/size_cover_detail_land"
android:layout_height="@dimen/size_cover_detail_land"
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}"

View file

@ -27,7 +27,7 @@
android:id="@+id/artist_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_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 @@
<TextView
android:id="@+id/artist_album_header"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginTop="@dimen/spacing_small"
android:text="@string/label_albums"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/artist_play_button" />

View file

@ -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 @@
<TextView
android:id="@+id/genre_song_header"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginTop="@dimen/spacing_small"
android:text="@string/label_songs"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/genre_play_button" />

View file

@ -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}"

View file

@ -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 @@
<TextView
android:id="@+id/artist_album_header"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginTop="@dimen/spacing_small"
android:text="@string/label_albums"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/artist_play_button" />

View file

@ -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 @@
<TextView
android:id="@+id/genre_song_header"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginTop="@dimen/spacing_small"
android:text="@string/label_songs"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/genre_play_button" />

View file

@ -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 @@
<ImageButton
android:id="@+id/playback_loop"
style="@style/Widget.Button.Unbounded"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginEnd="@dimen/spacing_large"
android:contentDescription="@string/description_change_loop"
android:onClick="@{() -> playbackModel.incrementLoopStatus()}"
android:src="@drawable/ic_loop"
@ -178,7 +178,7 @@
<ImageButton
android:id="@+id/playback_skip_prev"
style="@style/Widget.Button.Unbounded"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginEnd="@dimen/spacing_large"
android:contentDescription="@string/description_skip_prev"
android:onClick="@{() -> playbackModel.skipPrev()}"
android:src="@drawable/ic_skip_prev"
@ -200,7 +200,7 @@
<ImageButton
android:id="@+id/playback_skip_next"
style="@style/Widget.Button.Unbounded"
android:layout_marginStart="@dimen/margin_large"
android:layout_marginStart="@dimen/spacing_large"
android:contentDescription="@string/description_skip_next"
android:onClick="@{() -> playbackModel.skipNext()}"
android:src="@drawable/ic_skip_next"
@ -211,7 +211,7 @@
<ImageButton
android:id="@+id/playback_shuffle"
style="@style/Widget.Button.Unbounded"
android:layout_marginStart="@dimen/margin_large"
android:layout_marginStart="@dimen/spacing_large"
android:contentDescription="@{playbackModel.isShuffling() ? @string/description_shuffle_off : @string/description_shuffle_on"
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"
android:src="@drawable/ic_shuffle"

View file

@ -41,7 +41,7 @@
android:id="@+id/playback_cover"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/margin_mid_huge"
android:layout_margin="@dimen/spacing_mid_huge"
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"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_mid_huge"
android:layout_marginEnd="@dimen/margin_mid_huge"
android:layout_marginStart="@dimen/spacing_mid_huge"
android:layout_marginEnd="@dimen/spacing_mid_huge"
android:ellipsize="marquee"
android:fontFamily="@font/inter_semibold"
android:marqueeRepeatLimit="marquee_forever"
@ -77,8 +77,8 @@
android:id="@+id/playback_artist"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_mid_huge"
android:layout_marginEnd="@dimen/margin_mid_huge"
android:layout_marginStart="@dimen/spacing_mid_huge"
android:layout_marginEnd="@dimen/spacing_mid_huge"
android:ellipsize="end"
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album.artist)}"
android:singleLine="true"
@ -95,9 +95,9 @@
android:id="@+id/playback_album"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_mid_huge"
android:layout_marginEnd="@dimen/margin_mid_huge"
android:layout_marginBottom="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_mid_huge"
android:layout_marginEnd="@dimen/spacing_mid_huge"
android:layout_marginBottom="@dimen/spacing_medium"
android:ellipsize="end"
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}"
android:singleLine="true"
@ -116,8 +116,8 @@
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:paddingStart="@dimen/margin_mid_huge"
android:paddingEnd="@dimen/margin_mid_huge"
android:paddingStart="@dimen/spacing_mid_huge"
android:paddingEnd="@dimen/spacing_mid_huge"
android:progressBackgroundTint="?android:attr/colorControlNormal"
android:progressTint="?attr/colorPrimary"
android:splitTrack="false"
@ -132,8 +132,8 @@
android:id="@+id/playback_duration_current"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_mid_huge"
android:layout_marginBottom="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_mid_huge"
android:layout_marginBottom="@dimen/spacing_medium"
android:text="@{playbackModel.formattedPosition}"
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
app:layout_constraintStart_toStartOf="parent"
@ -143,8 +143,8 @@
android:id="@+id/playback_song_duration"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_mid_huge"
android:layout_marginBottom="@dimen/margin_medium"
android:layout_marginEnd="@dimen/spacing_mid_huge"
android:layout_marginBottom="@dimen/spacing_medium"
android:text="@{song.formattedDuration}"
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
app:layout_constraintEnd_toEndOf="parent"
@ -153,7 +153,7 @@
<ImageButton
android:id="@+id/playback_loop"
style="@style/Widget.Button.Unbounded"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginEnd="@dimen/spacing_large"
android:contentDescription="@string/description_change_loop"
android:onClick="@{() -> playbackModel.incrementLoopStatus()}"
android:src="@drawable/ic_loop"
@ -165,7 +165,7 @@
<ImageButton
android:id="@+id/playback_skip_prev"
style="@style/Widget.Button.Unbounded"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginEnd="@dimen/spacing_large"
android:background="@drawable/ui_unbounded_ripple"
android:contentDescription="@string/description_skip_prev"
android:onClick="@{() -> playbackModel.skipPrev()}"
@ -177,7 +177,7 @@
<org.oxycblt.auxio.playback.PlayPauseButton
android:id="@+id/playback_play_pause"
style="@style/PlayPause"
android:layout_marginBottom="@dimen/margin_large"
android:layout_marginBottom="@dimen/spacing_large"
android:contentDescription="@string/description_play_pause"
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
app:layout_constraintBottom_toBottomOf="parent"
@ -188,7 +188,7 @@
<ImageButton
android:id="@+id/playback_skip_next"
style="@style/Widget.Button.Unbounded"
android:layout_marginStart="@dimen/margin_large"
android:layout_marginStart="@dimen/spacing_large"
android:background="@drawable/ui_unbounded_ripple"
android:contentDescription="@string/description_skip_next"
android:onClick="@{() -> playbackModel.skipNext()}"
@ -200,7 +200,7 @@
<ImageButton
android:id="@+id/playback_shuffle"
style="@style/Widget.Button.Unbounded"
android:layout_marginStart="@dimen/margin_large"
android:layout_marginStart="@dimen/spacing_large"
android:background="@drawable/ui_unbounded_ripple"
android:contentDescription="@{playbackModel.isShuffling() ? @string/description_shuffle_off : @string/description_shuffle_on"
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"

View file

@ -19,7 +19,7 @@
android:id="@+id/about_auxio_icon"
android:layout_width="@dimen/size_app_icon"
android:layout_height="@dimen/size_app_icon"
android:layout_marginTop="@dimen/margin_medium"
android:layout_marginTop="@dimen/spacing_medium"
android:contentDescription="@string/description_auxio_icon"
android:src="@mipmap/ic_launcher"
app:layout_constraintEnd_toStartOf="@+id/about_app_name"
@ -32,7 +32,7 @@
android:id="@+id/about_app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_medium"
android:fontFamily="@font/inter_semibold"
android:text="@string/info_app_name"
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5"
@ -46,9 +46,9 @@
android:id="@+id/about_desc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_small"
android:paddingStart="@dimen/padding_small"
android:paddingEnd="@dimen/padding_small"
android:layout_marginTop="@dimen/spacing_small"
android:paddingStart="@dimen/spacing_small"
android:paddingEnd="@dimen/spacing_small"
android:text="@string/info_app_desc"
android:textAlignment="center"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
@ -60,7 +60,7 @@
android:id="@+id/version_container"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="@dimen/padding_medium"
android:padding="@dimen/spacing_medium"
app:layout_constraintBottom_toTopOf="@+id/about_code"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@ -82,7 +82,7 @@
android:id="@+id/about_version_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_medium"
android:text="@string/label_version"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:layout_constraintBottom_toTopOf="@+id/about_version"
@ -93,7 +93,7 @@
android:id="@+id/about_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_medium"
android:textAppearance="@style/TextAppearance.AppCompat.Caption"
app:layout_constraintBottom_toBottomOf="@+id/about_version_icon"
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
@ -108,9 +108,9 @@
android:layout_height="wrap_content"
android:background="@drawable/ui_ripple"
android:clickable="true"
android:drawablePadding="@dimen/padding_medium"
android:drawablePadding="@dimen/spacing_medium"
android:focusable="true"
android:padding="@dimen/padding_medium"
android:padding="@dimen/spacing_medium"
android:text="@string/label_code"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
@ -124,9 +124,9 @@
android:layout_height="wrap_content"
android:background="@drawable/ui_ripple"
android:clickable="true"
android:drawablePadding="@dimen/padding_medium"
android:drawablePadding="@dimen/spacing_medium"
android:focusable="true"
android:padding="@dimen/padding_medium"
android:padding="@dimen/spacing_medium"
android:text="@string/label_licenses"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
@ -140,9 +140,9 @@
android:layout_height="wrap_content"
android:background="@drawable/ui_ripple"
android:clickable="true"
android:drawablePadding="@dimen/padding_medium"
android:drawablePadding="@dimen/spacing_medium"
android:focusable="true"
android:padding="@dimen/padding_medium"
android:padding="@dimen/spacing_medium"
android:text="@string/label_faq"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
@ -155,8 +155,8 @@
android:id="@+id/about_song_count"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/padding_medium"
android:padding="@dimen/padding_medium"
android:drawablePadding="@dimen/spacing_medium"
android:padding="@dimen/spacing_medium"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
app:drawableStartCompat="@drawable/ic_song"
@ -168,8 +168,8 @@
android:id="@+id/about_author"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawablePadding="@dimen/padding_medium"
android:padding="@dimen/padding_medium"
android:drawablePadding="@dimen/spacing_medium"
android:padding="@dimen/spacing_medium"
android:text="@string/label_author"
android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"

View file

@ -7,7 +7,7 @@
android:id="@+id/accent_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="@dimen/margin_medium"
android:paddingTop="@dimen/spacing_medium"
android:foregroundGravity="center"
android:overScrollMode="never"
app:layoutManager="org.oxycblt.auxio.settings.accent.AutoGridLayoutManager"

View file

@ -9,7 +9,7 @@
android:layout_height="wrap_content"
android:background="@color/background"
android:orientation="vertical"
android:paddingTop="@dimen/margin_medium"
android:paddingTop="@dimen/spacing_medium"
android:theme="@style/Theme.Neutral">
<androidx.recyclerview.widget.RecyclerView
@ -28,7 +28,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/inter_semibold"
android:padding="@dimen/padding_medium"
android:padding="@dimen/spacing_medium"
android:text="@string/label_no_dirs"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceLarge"

View file

@ -41,7 +41,7 @@
android:id="@+id/playback_cover"
android:layout_width="@dimen/size_cover_compact"
android:layout_height="@dimen/size_cover_compact"
android:layout_margin="@dimen/margin_mid_small"
android:layout_margin="@dimen/spacing_small"
android:contentDescription="@{@string/description_album_cover(song.name)}"
app:albumArt="@{song}"
app:layout_constraintBottom_toBottomOf="parent"
@ -53,8 +53,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"
@ -72,8 +72,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)}"
@ -90,7 +90,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()}"

View file

@ -15,22 +15,22 @@
android:animateLayoutChanges="true"
android:gravity="center"
android:orientation="vertical"
android:padding="@dimen/padding_small">
android:padding="@dimen/spacing_small">
<ProgressBar
android:id="@+id/loading_circle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_small"
android:layout_margin="@dimen/spacing_small"
android:indeterminateTint="?attr/colorPrimary"
android:indeterminateTintMode="src_in"
android:paddingBottom="@dimen/padding_tiny" />
android:paddingBottom="@dimen/spacing_tiny" />
<ImageView
android:id="@+id/loading_error_icon"
android:layout_width="@dimen/size_error_icon"
android:layout_height="@dimen/size_error_icon"
android:layout_margin="@dimen/margin_small"
android:layout_margin="@dimen/spacing_small"
android:contentDescription="@string/description_error"
android:indeterminateTint="?attr/colorPrimary"
android:indeterminateTintMode="src_in"

View file

@ -41,7 +41,7 @@
android:id="@+id/playback_cover"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_margin="@dimen/margin_mid_large"
android:layout_margin="@dimen/spacing_mid_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"
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="marquee"
android:fontFamily="@font/inter_semibold"
android:marqueeRepeatLimit="marquee_forever"
@ -77,8 +77,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"
@ -95,9 +95,9 @@
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_marginBottom="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_mid_large"
android:layout_marginEnd="@dimen/spacing_mid_large"
android:layout_marginBottom="@dimen/spacing_medium"
android:ellipsize="end"
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}"
android:singleLine="true"
@ -116,8 +116,8 @@
android:layout_height="wrap_content"
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"
@ -132,8 +132,8 @@
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_marginBottom="@dimen/margin_medium"
android:layout_marginStart="@dimen/spacing_mid_large"
android:layout_marginBottom="@dimen/spacing_medium"
android:text="@{playbackModel.formattedPosition}"
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
app:layout_constraintStart_toStartOf="parent"
@ -143,8 +143,8 @@
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_marginBottom="@dimen/margin_medium"
android:layout_marginEnd="@dimen/spacing_mid_large"
android:layout_marginBottom="@dimen/spacing_medium"
android:text="@{song.formattedDuration}"
app:layout_constraintBottom_toTopOf="@+id/playback_play_pause"
app:layout_constraintEnd_toEndOf="parent"
@ -153,7 +153,7 @@
<ImageButton
android:id="@+id/playback_loop"
style="@style/Widget.Button.Unbounded"
android:layout_marginStart="@dimen/margin_mid_small"
android:layout_marginStart="@dimen/spacing_small"
android:contentDescription="@string/description_change_loop"
android:onClick="@{() -> playbackModel.incrementLoopStatus()}"
android:src="@drawable/ic_loop"
@ -175,7 +175,7 @@
<org.oxycblt.auxio.playback.PlayPauseButton
android:id="@+id/playback_play_pause"
style="@style/PlayPause"
android:layout_marginBottom="@dimen/margin_medium"
android:layout_marginBottom="@dimen/spacing_medium"
android:contentDescription="@string/description_play_pause"
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
app:layout_constraintBottom_toBottomOf="parent"
@ -197,7 +197,7 @@
<ImageButton
android:id="@+id/playback_shuffle"
style="@style/Widget.Button.Unbounded"
android:layout_marginEnd="@dimen/margin_mid_small"
android:layout_marginEnd="@dimen/spacing_small"
android:contentDescription="@{playbackModel.isShuffling() ? @string/description_shuffle_off : @string/description_shuffle_on"
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"
android:src="@drawable/ic_shuffle"

View file

@ -43,7 +43,7 @@
android:hint="@string/hint_search_library"
android:imeOptions="actionSearch|flagNoExtractUi"
android:inputType="textFilter"
android:padding="@dimen/padding_medium"
android:padding="@dimen/spacing_medium"
android:textCursorDrawable="@drawable/ui_cursor" />
</com.google.android.material.textfield.TextInputLayout>

View file

@ -6,7 +6,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/margin_small">
android:padding="@dimen/spacing_small">
<ImageButton
android:id="@+id/accent"
@ -14,7 +14,7 @@
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="@drawable/ui_circle_ripple"
android:padding="@dimen/margin_medium"
android:padding="@dimen/spacing_medium"
android:scaleType="fitCenter"
android:src="@drawable/ic_check"
tools:backgroundTint="?attr/colorPrimary"

View file

@ -27,7 +27,7 @@
android:id="@+id/album_cover"
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_album_cover(album.name)}"
android:elevation="@dimen/elevation_normal"
android:outlineProvider="bounds"
@ -42,9 +42,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="@{album.name}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
@ -56,7 +56,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:onClick="@{() -> detailModel.navToItem(album.artist)}"
android:text="@{album.artist.name}"
android:textAppearance="?android:attr/textAppearanceListItem"
@ -69,7 +69,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}"
@ -100,7 +100,7 @@
<TextView
android:id="@+id/album_song_header"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginTop="@dimen/spacing_small"
android:background="@drawable/ui_header_dividers"
android:text="@string/label_songs"
app:layout_constraintStart_toStartOf="parent"

View file

@ -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_marginTop="@dimen/margin_medium"
android:layout_marginTop="@dimen/spacing_medium"
android:contentDescription="@{@string/description_artist_image(artist.name)}"
android:elevation="@dimen/elevation_normal"
android:outlineProvider="bounds"
@ -42,9 +42,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="@{artist.name}"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
@ -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}"
@ -68,7 +68,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}"
@ -99,7 +99,7 @@
<TextView
android:id="@+id/artist_album_header"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginTop="@dimen/spacing_small"
android:text="@string/label_albums"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/artist_play_button" />

View file

@ -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"

View file

@ -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 @@
<TextView
android:id="@+id/genre_song_header"
style="@style/HeaderText"
android:layout_marginTop="@dimen/margin_small"
android:layout_marginTop="@dimen/spacing_small"
android:text="@string/label_songs"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/genre_play_button" />

View file

@ -27,7 +27,7 @@
<TextView
android:id="@+id/song_name"
style="@style/ItemText.Primary"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@{song.name}"
app:layout_constraintBottom_toTopOf="@+id/song_info"
app:layout_constraintEnd_toStartOf="@+id/duration"
@ -39,7 +39,7 @@
<TextView
android:id="@+id/song_info"
style="@style/ItemText.Secondary"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/duration"

View file

@ -14,7 +14,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="@dimen/padding_medium">
android:padding="@dimen/spacing_medium">
<ImageView
android:id="@+id/album_cover"
@ -31,7 +31,7 @@
<TextView
android:id="@+id/song_name"
style="@style/ItemText.Primary"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@{song.name}"
app:layout_constraintBottom_toTopOf="@+id/song_info"
app:layout_constraintEnd_toStartOf="@+id/song_drag_handle"
@ -43,8 +43,8 @@
<TextView
android:id="@+id/song_info"
style="@style/ItemText.Secondary"
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="@{@string/format_info(song.album.artist.name, song.album.name)}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/song_drag_handle"
@ -58,7 +58,7 @@
android:layout_height="0dp"
android:clickable="true"
android:focusable="true"
android:padding="@dimen/padding_tiny"
android:padding="@dimen/spacing_tiny"
android:src="@drawable/ic_handle"
app:layout_constraintBottom_toBottomOf="@+id/song_info"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -28,7 +28,7 @@
<TextView
android:id="@+id/song_name"
style="@style/ItemText.Primary"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@{song.name}"
app:layout_constraintBottom_toTopOf="@+id/song_info"
app:layout_constraintEnd_toEndOf="parent"
@ -40,7 +40,7 @@
<TextView
android:id="@+id/song_info"
style="@style/ItemText.Secondary"
android:layout_marginEnd="@dimen/margin_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -37,9 +37,9 @@
android:fontFamily="@font/inter_semibold"
android:gravity="center"
android:includeFontPadding="false"
android:lineSpacingExtra="@dimen/padding_tiny"
android:paddingTop="@dimen/padding_tiny"
android:paddingBottom="@dimen/padding_tiny"
android:lineSpacingExtra="@dimen/spacing_tiny"
android:paddingTop="@dimen/spacing_tiny"
android:paddingBottom="@dimen/spacing_tiny"
android:minWidth="@dimen/width_fast_scroll"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View file

@ -10,7 +10,7 @@
<item name="fontFamily">@font/inter_semibold</item>
<item name="textAllCaps">false</item>
<item name="cornerRadius">0dp</item>
<item name="android:padding">@dimen/padding_small</item>
<item name="android:padding">@dimen/spacing_small</item>
<item name="android:textSize">@dimen/text_size_material_button</item>
</style>
</resources>

View file

@ -1,20 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Padding Namespace | Dimens for padding attributes -->
<dimen name="padding_microscopic">2dp</dimen>
<dimen name="padding_tiny">4dp</dimen>
<dimen name="padding_small">8dp</dimen>
<dimen name="padding_mid_small">12dp</dimen>
<dimen name="padding_medium">16dp</dimen>
<!-- Margin namespace | Dimens for margin attributes -->
<dimen name="margin_small">8dp</dimen>
<dimen name="margin_mid_small">10dp</dimen>
<dimen name="margin_medium">16dp</dimen>
<dimen name="margin_mid_large">24dp</dimen>
<dimen name="margin_large">32dp</dimen>
<dimen name="margin_mid_huge">48dp</dimen>
<dimen name="margin_insane">128dp</dimen>
<!-- Spacing Namespace | Dimens for padding/margin attributes -->
<dimen name="spacing_micro">2dp</dimen>
<dimen name="spacing_tiny">4dp</dimen>
<dimen name="spacing_small">8dp</dimen>
<dimen name="spacing_medium">16dp</dimen>
<dimen name="spacing_mid_large">24dp</dimen>
<dimen name="spacing_large">32dp</dimen>
<dimen name="spacing_mid_huge">48dp</dimen>
<dimen name="spacing_insane">128dp</dimen>
<!-- Height Namespace | Height for UI elements -->
<dimen name="height_compact_progress">2dp</dimen>
@ -32,7 +26,7 @@
<dimen name="size_small_unb_ripple">18dp</dimen>
<dimen name="size_unb_ripple">24dp</dimen>
<dimen name="size_cover_compact">44dp</dimen>
<dimen name="size_cover_compact">46dp</dimen>
<dimen name="size_cover_normal">56dp</dimen>
<dimen name="size_cover_large">68dp</dimen>
<dimen name="size_cover_detail">260dp</dimen>

View file

@ -149,7 +149,7 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:background">@drawable/ui_ripple</item>
<item name="android:padding">@dimen/padding_medium</item>
<item name="android:padding">@dimen/spacing_medium</item>
<item name="android:clickable">true</item>
<item name="android:focusable">true</item>
</style>
@ -161,7 +161,7 @@
<item name="android:layout_height">wrap_content</item>
<item name="android:ellipsize">end</item>
<item name="android:maxLines">1</item>
<item name="android:layout_marginStart">@dimen/margin_medium</item>
<item name="android:layout_marginStart">@dimen/spacing_medium</item>
</style>
<!-- Style for primary item text -->
@ -180,10 +180,10 @@
<style name="HeaderText">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">match_parent</item>
<item name="android:paddingStart">@dimen/margin_medium</item>
<item name="android:paddingTop">@dimen/padding_small</item>
<item name="android:paddingBottom">@dimen/padding_small</item>
<item name="android:paddingEnd">@dimen/padding_medium</item>
<item name="android:paddingStart">@dimen/spacing_medium</item>
<item name="android:paddingTop">@dimen/spacing_small</item>
<item name="android:paddingBottom">@dimen/spacing_small</item>
<item name="android:paddingEnd">@dimen/spacing_medium</item>
<item name="android:textSize">@dimen/text_size_header</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:fontFamily">@font/inter_semibold</item>
@ -195,10 +195,10 @@
<style name="HeaderAction">
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">0dp</item>
<item name="android:paddingStart">@dimen/margin_medium</item>
<item name="android:paddingTop">@dimen/padding_small</item>
<item name="android:paddingBottom">@dimen/padding_small</item>
<item name="android:paddingEnd">@dimen/padding_medium</item>
<item name="android:paddingStart">@dimen/spacing_medium</item>
<item name="android:paddingTop">@dimen/spacing_small</item>
<item name="android:paddingBottom">@dimen/spacing_small</item>
<item name="android:paddingEnd">@dimen/spacing_medium</item>
<item name="android:background">@drawable/ui_small_unbounded_ripple</item>
</style>
@ -228,17 +228,17 @@
<!-- An "Unimportant" material button, used for the "Play" button -->
<style name="Widget.MaterialComponents.Button.Unimportant" parent="@style/Widget.MaterialComponents.Button.Base">
<item name="android:layout_marginTop">@dimen/margin_small</item>
<item name="android:layout_marginStart">@dimen/margin_medium</item>
<item name="android:layout_marginEnd">@dimen/margin_small</item>
<item name="android:layout_marginTop">@dimen/spacing_small</item>
<item name="android:layout_marginStart">@dimen/spacing_medium</item>
<item name="android:layout_marginEnd">@dimen/spacing_small</item>
<item name="strokeColor">@color/divider_color</item>
<item name="strokeWidth">@dimen/width_play_stroke</item>
</style>
<!-- An highlighted material button, used for the "Shuffle" button -->
<style name="Widget.MaterialComponents.Button.Highlighted" parent="@style/Widget.MaterialComponents.Button.Base">
<item name="android:layout_marginStart">@dimen/margin_small</item>
<item name="android:layout_marginEnd">@dimen/margin_medium</item>
<item name="android:layout_marginStart">@dimen/spacing_small</item>
<item name="android:layout_marginEnd">@dimen/spacing_medium</item>
<item name="rippleColor">@color/selection_color</item>
<item name="fontFamily">@font/inter_semibold</item>
<item name="textAllCaps">false</item>
@ -251,7 +251,7 @@
<item name="android:layout_height">@dimen/size_play_pause_compact</item>
<item name="android:background">@drawable/ui_unbounded_ripple</item>
<item name="android:scaleType">fitCenter</item>
<item name="android:padding">@dimen/padding_microscopic</item>
<item name="android:padding">@dimen/spacing_micro</item>
</style>
<!-- Style for the play/pause circle button -->
@ -261,10 +261,10 @@
<item name="android:background">@drawable/ui_circle_ripple</item>
<item name="android:backgroundTint">?attr/colorPrimary</item>
<item name="android:tint">?android:attr/windowBackground</item>
<item name="android:layout_marginStart">@dimen/margin_large</item>
<item name="android:layout_marginTop">@dimen/margin_medium</item>
<item name="android:layout_marginEnd">@dimen/margin_large</item>
<item name="android:layout_marginStart">@dimen/spacing_large</item>
<item name="android:layout_marginTop">@dimen/spacing_medium</item>
<item name="android:layout_marginEnd">@dimen/spacing_large</item>
<item name="android:scaleType">fitCenter</item>
<item name="android:padding">@dimen/padding_medium</item>
<item name="android:padding">@dimen/spacing_medium</item>
</style>
</resources>