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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user