Refactor styles heavily
Move a bunch of UI elements into reusable styles, along with removing literal dimen resources.
This commit is contained in:
@@ -26,14 +26,8 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/album_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:popupTheme="@style/AppThemeOverlay.Popup"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
app:menu="@menu/menu_album_actions"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header"
|
||||
app:navigationIcon="@drawable/ic_back"
|
||||
app:title="@string/label_library" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
@@ -60,7 +54,7 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/album_name"
|
||||
style="@style/DetailHeader"
|
||||
style="@style/DetailTitleText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
@@ -69,7 +63,7 @@
|
||||
android:maxLines="1"
|
||||
android:text="@{album.name}"
|
||||
android:ellipsize="end"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_header_max"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_increment"
|
||||
app:autoSizeTextType="uniform"
|
||||
@@ -109,32 +103,17 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_song_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/HeaderText"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:text="@string/label_songs"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_details"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/album_sort_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
style="@style/HeaderAction"
|
||||
android:contentDescription="@string/description_sort_button"
|
||||
android:onClick="@{() -> detailModel.incrementAlbumSortMode()}"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/margin_medium"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/album_song_header"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/album_song_header"
|
||||
|
||||
@@ -26,14 +26,8 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/artist_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:popupTheme="@style/AppThemeOverlay.Popup"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
app:menu="@menu/menu_detail"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header"
|
||||
app:navigationIcon="@drawable/ic_back"
|
||||
app:title="@string/label_library" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
@@ -59,14 +53,14 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/artist_name"
|
||||
style="@style/DetailHeader"
|
||||
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:text="@{artist.name}"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_header_max"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_increment"
|
||||
app:autoSizeTextType="uniform"
|
||||
@@ -102,31 +96,17 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_album_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/HeaderText"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:text="@string/label_albums"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_counts" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/artist_sort_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
style="@style/HeaderAction"
|
||||
android:contentDescription="@string/description_sort_button"
|
||||
android:onClick="@{() -> detailModel.incrementArtistSortMode()}"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/margin_medium"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/artist_album_header"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/artist_album_header"
|
||||
|
||||
@@ -26,14 +26,8 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/genre_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:popupTheme="@style/AppThemeOverlay.Popup"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
app:menu="@menu/menu_detail"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header"
|
||||
app:navigationIcon="@drawable/ic_back"
|
||||
app:title="@string/label_library" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
@@ -60,14 +54,14 @@
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/genre_name"
|
||||
style="@style/DetailHeader"
|
||||
style="@style/DetailTitleText"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:text="@{genre.name}"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_header_max"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_increment"
|
||||
app:autoSizeTextType="uniform"
|
||||
@@ -103,31 +97,17 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_artist_header"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
style="@style/HeaderText"
|
||||
android:layout_marginTop="@dimen/padding_medium"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:text="@string/label_artists"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/genre_song_count" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/genre_sort_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
style="@style/HeaderAction"
|
||||
android:contentDescription="@string/description_sort_button"
|
||||
android:onClick="@{() -> detailModel.incrementGenreSortMode()}"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/margin_medium"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/genre_artist_header"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/genre_artist_header"
|
||||
|
||||
@@ -12,14 +12,9 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/library_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:theme="@style/Toolbar.Style"
|
||||
app:popupTheme="@style/AppThemeOverlay.Popup"
|
||||
style="@style/Toolbar.Style"
|
||||
android:theme="@style/Toolbar.Style.Search"
|
||||
app:menu="@menu/menu_library"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header"
|
||||
app:title="@string/label_library" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
@@ -26,18 +26,13 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/playback_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:theme="@style/Toolbar.Style"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
android:elevation="0dp"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/label_playback"
|
||||
app:menu="@menu/menu_playback"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
|
||||
app:menu="@menu/menu_playback" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/playback_cover"
|
||||
|
||||
@@ -13,28 +13,16 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/queue_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:theme="@style/Toolbar.Style"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:popupTheme="@style/Widget.CustomPopup"
|
||||
style="@style/Toolbar.Style.Icon"
|
||||
app:navigationIcon="@drawable/ic_down"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/label_queue"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
|
||||
app:title="@string/label_queue" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/queue_recycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintTop_toBottomOf="@+id/queue_header"
|
||||
tools:layout_editor_absoluteX="0dp"
|
||||
tools:listitem="@layout/item_basic_song" />
|
||||
tools:listitem="@layout/item_queue_song" />
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
||||
@@ -1,24 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:theme="@style/ThemeOverlay.Accented"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/song_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:title="@string/setting_title"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
|
||||
style="@style/Toolbar.Style"
|
||||
app:title="@string/setting_title" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/settings_list_fragment"
|
||||
|
||||
@@ -12,15 +12,11 @@
|
||||
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/song_toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="?android:attr/actionBarSize"
|
||||
android:background="?android:attr/windowBackground"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
style="@style/Toolbar.Style"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:menu="@menu/menu_songs"
|
||||
app:title="@string/label_all_songs"
|
||||
app:titleTextAppearance="@style/TextAppearance.Toolbar.Header" />
|
||||
app:title="@string/label_all_songs" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/song_recycler"
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
</data>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
@@ -18,33 +18,19 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/header_title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/padding_medium"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
style="@style/HeaderText"
|
||||
android:text="@{header.name}"
|
||||
tools:text="Songs"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:textSize="19sp"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:text="Songs" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/header_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:contentDescription="@string/description_sort_button"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:background="@drawable/ui_small_unbounded_ripple"
|
||||
android:paddingEnd="@dimen/margin_medium"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
style="@style/HeaderAction"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/header_title"
|
||||
tools:src="@drawable/ic_sort_numeric_down" />
|
||||
tools:src="@drawable/ic_clear"
|
||||
tools:ignore="ContentDescription" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
||||
@@ -11,13 +11,7 @@
|
||||
type="org.oxycblt.auxio.music.Album" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_cover"
|
||||
@@ -32,14 +26,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
style="@style/ItemText.Primary"
|
||||
android:text="@{album.name}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintBottom_toTopOf="@+id/album_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||
@@ -49,14 +37,10 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_info"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="1"
|
||||
style="@style/ItemText.Secondary"
|
||||
app:albumInfo="@{album}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||
app:layout_constraintTop_toBottomOf="@+id/album_name"
|
||||
tools:text="Artist / 10 Songs" />
|
||||
|
||||
@@ -11,15 +11,9 @@
|
||||
type="org.oxycblt.auxio.music.Song" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
<TextView
|
||||
android:id="@+id/song_track"
|
||||
android:layout_width="@dimen/width_track_number"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -30,10 +24,10 @@
|
||||
android:textSize="@dimen/text_size_track_max"
|
||||
android:maxLines="1"
|
||||
android:contentDescription="@{@string/description_track_number(song.track)}"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_header_max"
|
||||
android:gravity="center"
|
||||
app:autoSizeMaxTextSize="@dimen/text_size_detail_header_max"
|
||||
app:autoSizeMinTextSize="@dimen/text_size_min"
|
||||
app:autoSizeStepGranularity="@dimen/text_size_increment"
|
||||
android:gravity="center"
|
||||
app:autoSizeTextType="uniform"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
@@ -42,15 +36,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
style="@style/ItemText.Primary"
|
||||
android:text="@{song.name}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_duration"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/song_track"
|
||||
@@ -60,13 +47,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_duration"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@{song.formattedDuration}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
type="org.oxycblt.auxio.music.Artist" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/artist_image"
|
||||
@@ -32,14 +26,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
style="@style/ItemText.Primary"
|
||||
android:text="@{artist.name}"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/artist_details"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_image"
|
||||
@@ -49,13 +37,10 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_details"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
style="@style/ItemText.Secondary"
|
||||
app:artistCounts="@{artist}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_image"
|
||||
app:layout_constraintTop_toBottomOf="@+id/artist_name"
|
||||
tools:text="2 Albums, 20 Songs" />
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
type="org.oxycblt.auxio.music.Album" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_cover"
|
||||
@@ -32,14 +26,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
style="@style/ItemText.Primary"
|
||||
android:text="@{album.name}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
app:layout_constraintBottom_toTopOf="@+id/album_year"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||
@@ -49,12 +37,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/album_year"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:maxLines="1"
|
||||
style="@style/ItemText.Secondary"
|
||||
app:albumYear="@{album}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
type="org.oxycblt.auxio.music.Song" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_cover"
|
||||
@@ -33,15 +27,9 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
style="@style/ItemText.Primary"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{song.name}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||
@@ -51,14 +39,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
type="org.oxycblt.auxio.music.Genre" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/genre_image"
|
||||
@@ -32,14 +26,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
style="@style/ItemText.Primary"
|
||||
android:text="@{genre.name}"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/genre_count"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/genre_image"
|
||||
@@ -49,11 +37,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/genre_count"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
style="@style/ItemText.Secondary"
|
||||
app:genreCounts="@{genre}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/genre_image"
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
type="org.oxycblt.auxio.music.Artist" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/artist_image"
|
||||
@@ -32,14 +26,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
style="@style/ItemText.Primary"
|
||||
android:text="@{artist.name}"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/artist_counts"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_image"
|
||||
@@ -49,11 +37,7 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/artist_counts"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
style='@style/ItemText.Secondary'
|
||||
app:artistCounts="@{artist}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/artist_image"
|
||||
|
||||
@@ -11,17 +11,8 @@
|
||||
</data>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/header_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:textSize="19sp"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:id="@android:id/title"
|
||||
style="@style/HeaderText"
|
||||
android:text="@{header.name}"
|
||||
tools:text="Songs" />
|
||||
</layout>
|
||||
@@ -1,16 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TextView android:id="@android:id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
android:fontFamily="@font/inter_semibold"
|
||||
android:paddingStart="@dimen/padding_medium"
|
||||
android:paddingTop="@dimen/padding_small"
|
||||
android:paddingEnd="@dimen/padding_small"
|
||||
android:paddingBottom="@dimen/padding_small"
|
||||
android:textSize="19sp"
|
||||
android:background="@drawable/ui_header_dividers"
|
||||
android:text="@{header.name}"
|
||||
tools:text="UI"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" />
|
||||
@@ -30,15 +30,9 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
style="@style/ItemText.Primary"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{song.name}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||
app:layout_constraintEnd_toStartOf="@+id/song_drag_handle"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||
@@ -48,14 +42,9 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
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"
|
||||
@@ -67,13 +56,13 @@
|
||||
android:id="@+id/song_drag_handle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:padding="@dimen/padding_tiny"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_tiny"
|
||||
android:src="@drawable/ic_handle"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/song_info"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/song_name"
|
||||
tools:ignore="ContentDescription" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -11,13 +11,7 @@
|
||||
type="org.oxycblt.auxio.music.Song" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/ui_ripple"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:padding="@dimen/padding_medium">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout style="@style/ItemSurroundings">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/album_cover"
|
||||
@@ -28,20 +22,13 @@
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:ignore="ContentDescription"
|
||||
tools:src="@drawable/ic_song" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_name"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
style="@style/ItemText.Primary"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{song.name}"
|
||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||
android:textColor="?android:attr/textColorPrimary"
|
||||
app:layout_constraintBottom_toTopOf="@+id/song_info"
|
||||
app:layout_constraintEnd_toStartOf="@+id/duration"
|
||||
app:layout_constraintStart_toEndOf="@+id/album_cover"
|
||||
@@ -51,14 +38,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/song_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:layout_marginEnd="@dimen/margin_medium"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorSecondary"
|
||||
android:text="@{@string/format_info(song.album.artist.name, song.album.name)}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/duration"
|
||||
@@ -68,13 +49,11 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/duration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="end"
|
||||
style="@style/ItemText.Secondary"
|
||||
android:text="@{song.formattedDuration}"
|
||||
android:textAlignment="viewEnd"
|
||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||
android:textColor="?android:attr/textColorTertiary"
|
||||
android:gravity="end"
|
||||
android:ellipsize="none"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
Reference in New Issue
Block a user