styles: refactor styles
Completely refactor styles once again to improve resource sharing and styling maintainability.
This commit is contained in:
@@ -10,5 +10,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:defaultNavHost="true"
|
||||
app:navGraph="@navigation/nav_main" />
|
||||
app:navGraph="@navigation/nav_main"
|
||||
tools:layout="@layout/fragment_main" />
|
||||
</layout>
|
||||
@@ -7,9 +7,8 @@
|
||||
android:id="@+id/accent_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:foregroundGravity="center"
|
||||
android:overScrollMode="never"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
app:layoutManager="org.oxycblt.auxio.settings.accent.AutoGridLayoutManager"
|
||||
app:layout_constraintBottom_toTopOf="@+id/accent_cancel"
|
||||
app:layout_constraintTop_toBottomOf="@+id/accent_header"
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/colorSurface"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/spacing_medium"
|
||||
android:paddingTop="@dimen/spacing_small"
|
||||
android:theme="@style/Theme.Neutral">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -13,10 +13,7 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/about_toolbar"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
style="@style/Toolbar.Style.Icon.Down"
|
||||
app:title="@string/label_about" />
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
@@ -101,22 +98,14 @@
|
||||
app:layout_constraintBottom_toBottomOf="@+id/about_version_icon"
|
||||
app:layout_constraintStart_toEndOf="@+id/about_version_icon"
|
||||
app:layout_constraintTop_toBottomOf="@+id/about_version_title"
|
||||
tools:text="0.0.0" />
|
||||
tools:text="16.16.16" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_code"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="@dimen/spacing_medium"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
style="@style/Widget.TextView.About.Clickable"
|
||||
android:text="@string/label_code"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
app:drawableStartCompat="@drawable/ic_code"
|
||||
app:layout_constraintBottom_toTopOf="@+id/about_faq"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -125,16 +114,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_licenses"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="@dimen/spacing_medium"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
style="@style/Widget.TextView.About.Clickable"
|
||||
android:text="@string/label_licenses"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
app:drawableStartCompat="@drawable/ic_license"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -142,16 +123,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_faq"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="@dimen/spacing_medium"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
style="@style/Widget.TextView.About.Clickable"
|
||||
android:text="@string/label_faq"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
app:drawableStartCompat="@drawable/ic_about"
|
||||
app:layout_constraintBottom_toTopOf="@+id/about_licenses"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
@@ -160,26 +133,18 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_song_count"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/spacing_medium"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
style="@style/Widget.TextView.About"
|
||||
android:theme="@style/Theme.Neutral"
|
||||
app:drawableStartCompat="@drawable/ic_song"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/about_licenses"
|
||||
tools:text="Songs Loaded: 1616" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/about_author"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawablePadding="@dimen/spacing_medium"
|
||||
android:padding="@dimen/spacing_medium"
|
||||
style="@style/Widget.TextView.About"
|
||||
android:text="@string/label_author"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.AppCompat.Subhead"
|
||||
app:drawableStartCompat="@drawable/ic_author"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -26,22 +26,15 @@
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/playback_progress"
|
||||
style="?android:attr/progressBarStyleHorizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/height_compact_progress"
|
||||
android:clickable="false"
|
||||
style="@style/Widget.Seekbar.Compact"
|
||||
android:progress="@{playbackModel.positionAsProgress}"
|
||||
android:progressBackgroundTint="?attr/colorControlNormal"
|
||||
android:progressTint="?attr/colorPrimary"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:progress="70" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playback_cover"
|
||||
android:layout_width="@dimen/size_cover_compact"
|
||||
android:layout_height="@dimen/size_cover_compact"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
style="@style/CompactImageView"
|
||||
android:contentDescription="@{@string/description_album_cover(song.name)}"
|
||||
app:albumArt="@{song}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
@@ -51,16 +44,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:singleLine="true"
|
||||
style="@style/Widget.TextView.Compact.Primary"
|
||||
android:text="@{song.name}"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.SmallHeader"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_info"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
@@ -70,15 +55,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/spacing_small"
|
||||
android:layout_marginEnd="@dimen/spacing_small"
|
||||
android:ellipsize="end"
|
||||
android:singleLine="true"
|
||||
style="@style/Widget.TextView.Compact.Secondary"
|
||||
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Caption"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/playback_play_pause"
|
||||
app:layout_constraintStart_toEndOf="@+id/playback_cover"
|
||||
@@ -87,14 +65,9 @@
|
||||
|
||||
<org.oxycblt.auxio.playback.PlayPauseButton
|
||||
android:id="@+id/playback_play_pause"
|
||||
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/spacing_small"
|
||||
android:background="@drawable/ui_unbounded_ripple"
|
||||
style="@style/Widget.Button.Unbounded.PlayPause"
|
||||
android:contentDescription="@string/description_play_pause"
|
||||
android:onClick="@{() -> playbackModel.invertPlayingStatus()}"
|
||||
android:tint="@color/control_color"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/detail_toolbar"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
android:background="?attr/colorSurface"
|
||||
android:elevation="@dimen/elevation_normal" />
|
||||
style="@style/Toolbar.Style.Icon" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/library_toolbar"
|
||||
style="@style/Toolbar.Style"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:menu="@menu/menu_library"
|
||||
app:title="@string/label_library" />
|
||||
|
||||
|
||||
@@ -22,8 +22,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:indeterminateTint="?attr/colorPrimary"
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:paddingBottom="@dimen/spacing_tiny" />
|
||||
|
||||
<ImageView
|
||||
@@ -32,8 +30,6 @@
|
||||
android:layout_height="@dimen/size_error_icon"
|
||||
android:layout_margin="@dimen/spacing_small"
|
||||
android:contentDescription="@string/description_error"
|
||||
android:indeterminateTint="?attr/colorPrimary"
|
||||
android:indeterminateTintMode="src_in"
|
||||
android:src="@drawable/ic_error"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
@@ -50,25 +46,17 @@
|
||||
|
||||
<Button
|
||||
android:id="@+id/loading_retry_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
style="@style/Widget.Button.Unbounded.Text"
|
||||
android:onClick="@{() -> loadingModel.load(context)}"
|
||||
android:text="@string/label_retry"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/loading_grant_button"
|
||||
style="@style/Widget.AppCompat.Button.Borderless.Colored"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
style="@style/Widget.Button.Unbounded.Text"
|
||||
android:onClick="@{() -> loadingModel.grant()}"
|
||||
android:text="@string/label_grant"
|
||||
android:textColor="?attr/colorPrimary"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
type="org.oxycblt.auxio.detail.DetailViewModel" />
|
||||
</data>
|
||||
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/playback_layout"
|
||||
android:layout_width="match_parent"
|
||||
@@ -29,22 +28,18 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
style="@style/Toolbar.Style.Icon.Down"
|
||||
android:elevation="0dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_playback"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
app:title="@string/label_playback" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playback_cover"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
style="@style/ElevatedImageView"
|
||||
android:layout_margin="@dimen/spacing_mid_large"
|
||||
android:contentDescription="@{@string/description_album_cover(song.name)}"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:outlineProvider="bounds"
|
||||
app:albumArt="@{song}"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_song"
|
||||
app:layout_constraintDimensionRatio="1:1"
|
||||
@@ -55,18 +50,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_song"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.TextView.Playback.Primary"
|
||||
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"
|
||||
android:onClick="@{() -> detailModel.navToItem(playbackModel.song)}"
|
||||
android:singleLine="true"
|
||||
android:text="@{song.name}"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline6"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_artist"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -75,17 +63,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_artist"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.TextView.Playback.Secondary"
|
||||
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"
|
||||
android:text="@{song.album.artist.name}"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_album"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -93,18 +75,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/playback_album"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/Widget.TextView.Playback.Secondary"
|
||||
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"
|
||||
android:text="@{song.album.name}"
|
||||
android:textAlignment="viewStart"
|
||||
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle1"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_seek_bar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -112,17 +87,9 @@
|
||||
|
||||
<SeekBar
|
||||
android:id="@+id/playback_seek_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:paddingStart="@dimen/spacing_mid_large"
|
||||
android:paddingEnd="@dimen/spacing_mid_large"
|
||||
android:progressBackgroundTint="?android:attr/colorControlNormal"
|
||||
android:progressTint="?attr/colorPrimary"
|
||||
android:splitTrack="false"
|
||||
android:thumbOffset="@dimen/offset_thumb"
|
||||
android:thumbTint="?attr/colorPrimary"
|
||||
android:layout_width="match_parent"
|
||||
style="@style/Widget.SeekBar.Full"
|
||||
app:layout_constraintBottom_toTopOf="@+id/playback_duration_current"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/queue_toolbar"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
style="@style/Toolbar.Style.Icon.Down"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
app:title="@string/label_queue" />
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/search_toolbar"
|
||||
style="@style/Toolbar.Style"
|
||||
android:background="?attr/colorSurface"
|
||||
android:elevation="0dp"
|
||||
app:layout_scrollFlags="scroll|enterAlways"
|
||||
app:menu="@menu/menu_search"
|
||||
app:title="@string/label_search" />
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/settings_toolbar"
|
||||
style="@style/Toolbar.Style"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:menu="@menu/menu_settings"
|
||||
app:title="@string/setting_title" />
|
||||
|
||||
|
||||
@@ -13,8 +13,6 @@
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/song_toolbar"
|
||||
style="@style/Toolbar.Style"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_songs"
|
||||
|
||||
@@ -25,12 +25,11 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_cover"
|
||||
style="@style/ElevatedImageView"
|
||||
android:layout_width="@dimen/size_cover_detail"
|
||||
android:layout_height="@dimen/size_cover_detail"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:contentDescription="@{@string/description_album_cover(album.name)}"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:outlineProvider="bounds"
|
||||
app:albumArt="@{album}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
android:layout_height="@dimen/size_cover_detail"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:contentDescription="@{@string/description_artist_image(artist.name)}"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:outlineProvider="bounds"
|
||||
style="@style/ElevatedImageView"
|
||||
app:artistImage="@{artist}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
@@ -30,8 +30,7 @@
|
||||
android:layout_height="@dimen/size_cover_detail"
|
||||
android:layout_marginTop="@dimen/spacing_medium"
|
||||
android:contentDescription="@{@string/description_genre_image(genre.name)}"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:outlineProvider="bounds"
|
||||
style="@style/ElevatedImageView"
|
||||
app:genreImage="@{genre}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user