From e697908a2f9546327737f436afca3f0f0e6ff2b7 Mon Sep 17 00:00:00 2001 From: OxygenCobalt Date: Sat, 20 Nov 2021 16:54:03 -0700 Subject: [PATCH] detail: update layouts Update the detail layouts to work better on tablets and be more consistent overall. --- .../org/oxycblt/auxio/coil/AuxioFetcher.kt | 2 +- .../res/layout-land/fragment_playback.xml | 1 - app/src/main/res/layout-land/item_detail.xml | 12 +-- .../layout-sw600dp-land/fragment_playback.xml | 1 - .../res/layout-sw600dp/fragment_playback.xml | 1 - .../main/res/layout-sw600dp/item_detail.xml | 96 +++++++++++++++++++ .../item_detail.xml | 23 +++-- .../layout-w600dp/view_compact_playback.xml | 2 +- app/src/main/res/layout/fragment_about.xml | 4 +- app/src/main/res/layout/fragment_playback.xml | 1 - app/src/main/res/layout/item_album.xml | 2 +- app/src/main/res/layout/item_artist.xml | 2 +- app/src/main/res/layout/item_artist_album.xml | 2 +- app/src/main/res/layout/item_artist_song.xml | 2 +- app/src/main/res/layout/item_detail.xml | 10 +- app/src/main/res/layout/item_genre.xml | 2 +- app/src/main/res/layout/item_genre_song.xml | 2 +- app/src/main/res/layout/item_queue_song.xml | 2 +- app/src/main/res/layout/item_song.xml | 2 +- .../main/res/layout/view_compact_playback.xml | 2 +- app/src/main/res/layout/widget_tiny.xml | 2 +- .../config.xml | 0 app/src/main/res/values/dimens.xml | 3 +- app/src/main/res/values/styles_core.xml | 4 + app/src/main/res/values/styles_ui.xml | 22 ++++- app/src/main/res/values/typography.xml | 23 ++++- 26 files changed, 176 insertions(+), 49 deletions(-) create mode 100644 app/src/main/res/layout-sw600dp/item_detail.xml rename app/src/main/res/{layout-large => layout-sw840dp}/item_detail.xml (84%) rename app/src/main/res/{values-w600dp => values-w640dp}/config.xml (100%) diff --git a/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt b/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt index 2b22ab5ce..dedd9fb7b 100644 --- a/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt +++ b/app/src/main/java/org/oxycblt/auxio/coil/AuxioFetcher.kt @@ -45,7 +45,7 @@ abstract class AuxioFetcher : Fetcher { } /** - * Create a mosaic image from multiple image views, Code adapted from Phonograph + * Create a mosaic image from multiple streams of image data, Code adapted from Phonograph * https://github.com/kabouzeid/Phonograph */ protected fun createMosaic(context: Context, streams: List): FetchResult? { diff --git a/app/src/main/res/layout-land/fragment_playback.xml b/app/src/main/res/layout-land/fragment_playback.xml index ea6b6f9e1..be2730e85 100644 --- a/app/src/main/res/layout-land/fragment_playback.xml +++ b/app/src/main/res/layout-land/fragment_playback.xml @@ -42,7 +42,6 @@ android:contentDescription="@{@string/desc_album_cover(song.name)}" app:albumArt="@{song}" app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintDimensionRatio="1" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/playback_toolbar" tools:src="@drawable/ic_album" /> diff --git a/app/src/main/res/layout-land/item_detail.xml b/app/src/main/res/layout-land/item_detail.xml index 9a48648db..64d187b3b 100644 --- a/app/src/main/res/layout-land/item_detail.xml +++ b/app/src/main/res/layout-land/item_detail.xml @@ -12,9 +12,7 @@ - - diff --git a/app/src/main/res/layout-sw600dp/fragment_playback.xml b/app/src/main/res/layout-sw600dp/fragment_playback.xml index 6a9579bc8..d2a1ff4a6 100644 --- a/app/src/main/res/layout-sw600dp/fragment_playback.xml +++ b/app/src/main/res/layout-sw600dp/fragment_playback.xml @@ -42,7 +42,6 @@ android:contentDescription="@{@string/desc_album_cover(song.name)}" app:albumArt="@{song}" app:layout_constraintBottom_toTopOf="@+id/playback_song" - app:layout_constraintDimensionRatio="1:1" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/playback_toolbar" diff --git a/app/src/main/res/layout-sw600dp/item_detail.xml b/app/src/main/res/layout-sw600dp/item_detail.xml new file mode 100644 index 000000000..e798c2e6d --- /dev/null +++ b/app/src/main/res/layout-sw600dp/item_detail.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + +