styles: refactor style methodology
Refactor the styling again to make all styles start with the Auxio prefix. Also try to phase out the usage of layout_width and layout_height in most places, since those can cause a lot of frustration if they aren't used in the layout they are expected in.
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Widget.Toolbar.Icon.Down"
|
||||
style="@style/Widget.Auxio.Toolbar.Icon.Down"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playback_cover"
|
||||
style="@style/Widget.ImageView.Full"
|
||||
style="@style/Widget.Auxio.Image.Full"
|
||||
android:layout_margin="@dimen/spacing_large"
|
||||
android:contentDescription="@{@string/desc_album_cover(song.name)}"
|
||||
app:albumArt="@{song}"
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
style="@style/Widget.TextView.Primary"
|
||||
style="@style/Widget.Auxio.TextView.Primary"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:onClick="@{() -> detailModel.navToItem(playbackModel.song)}"
|
||||
@@ -74,7 +74,9 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_artist"
|
||||
style="@style/Widget.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album.artist)}"
|
||||
@@ -87,7 +89,9 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_album"
|
||||
style="@style/Widget.TextView.Secondary"
|
||||
style="@style/Widget.Auxio.TextView.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_mid_large"
|
||||
android:layout_marginEnd="@dimen/spacing_mid_large"
|
||||
android:onClick="@{() -> detailModel.navToItem(playbackModel.song.album)}"
|
||||
@@ -100,7 +104,7 @@
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/playback_seek_bar"
|
||||
style="@style/Widget.SeekBar.Full"
|
||||
style="@style/Widget.Auxio.SeekBar"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
@@ -134,7 +138,9 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_loop"
|
||||
style="@style/Widget.Button.Unbounded"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_change_loop"
|
||||
android:onClick="@{() -> playbackModel.incrementLoopStatus()}"
|
||||
@@ -146,7 +152,9 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_skip_prev"
|
||||
style="@style/Widget.Button.Unbounded"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_skip_prev"
|
||||
android:onClick="@{() -> playbackModel.skipPrev()}"
|
||||
android:src="@drawable/ic_skip_prev"
|
||||
@@ -157,9 +165,15 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
style="@style/Widget.Component.Playback.PlayPause"
|
||||
style="@style/Widget.Auxio.Button.Circular"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:layout_marginEnd="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_play_pause"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
android:src="@drawable/sel_playing_state"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
app:layout_constraintStart_toStartOf="@+id/playback_duration_current"
|
||||
@@ -168,7 +182,9 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_skip_next"
|
||||
style="@style/Widget.Button.Unbounded"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@string/desc_skip_next"
|
||||
android:onClick="@{() -> playbackModel.skipNext()}"
|
||||
android:src="@drawable/ic_skip_next"
|
||||
@@ -179,15 +195,17 @@
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/playback_shuffle"
|
||||
style="@style/Widget.Button.Unbounded"
|
||||
style="@style/Widget.Auxio.Button.Unbounded"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:contentDescription="@string/desc_shuffle"
|
||||
android:onClick="@{() -> playbackModel.invertShuffleStatus()}"
|
||||
android:src="@drawable/ic_shuffle"
|
||||
app:tint="@color/sel_accented"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/playback_skip_next"
|
||||
app:layout_constraintEnd_toEndOf="@+id/playback_song_duration"
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next" />
|
||||
app:layout_constraintTop_toTopOf="@+id/playback_skip_next"
|
||||
app:tint="@color/sel_accented" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -12,17 +12,17 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/detail_cover"
|
||||
style="@style/Widget.ImageView.Full"
|
||||
style="@style/Widget.Auxio.Image.Full"
|
||||
android:layout_width="@dimen/size_cover_huge_land"
|
||||
android:layout_height="@dimen/size_cover_huge_land"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:src="@drawable/ic_artist"
|
||||
tools:ignore="ContentDescription" />
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_artist" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/detail_name"
|
||||
style="@style/Widget.TextView.Detail"
|
||||
style="@style/Widget.Auxio.TextView.Detail"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_medium"
|
||||
@@ -63,7 +63,9 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/detail_play_button"
|
||||
style="@style/Widget.Button.Vibrant.Secondary"
|
||||
style="@style/Widget.Auxio.Button.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:text="@string/lbl_play"
|
||||
@@ -74,7 +76,9 @@
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/detail_shuffle_button"
|
||||
style="@style/Widget.Button.Vibrant.Primary"
|
||||
style="@style/Widget.Auxio.Button.Primary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:backgroundTint="?attr/colorAccent"
|
||||
android:text="@string/lbl_shuffle"
|
||||
|
||||
Reference in New Issue
Block a user