From 5788fb873297db9f70eff3638cd80a46812016fc Mon Sep 17 00:00:00 2001 From: OxygenCobalt Date: Mon, 16 Aug 2021 19:31:00 -0600 Subject: [PATCH] style: tweak dimens Tweak some dimens so that they line up with the 8dp grid. This doesn't apply to all of them since some of them are fined-tuned [such as the fast-scroller]. The latter would likely be migrated in the later UI overhaul. --- .../playback/state/PlaybackStateDatabase.kt | 2 +- .../java/org/oxycblt/auxio/ui/AndroidUtils.kt | 1 - .../main/res/layout-land/fragment_main.xml | 2 +- .../res/layout-land/item_album_header.xml | 4 ++-- .../res/layout-land/item_artist_header.xml | 4 ++-- .../res/layout-land/item_genre_header.xml | 4 ++-- .../res/layout-large/item_album_header.xml | 4 ++-- .../res/layout-large/item_artist_header.xml | 4 ++-- .../res/layout-large/item_genre_header.xml | 4 ++-- app/src/main/res/layout/fragment_loading.xml | 10 +--------- app/src/main/res/layout/fragment_main.xml | 5 +++-- app/src/main/res/layout/item_album_header.xml | 4 ++-- .../main/res/layout/item_artist_header.xml | 4 ++-- app/src/main/res/layout/item_genre_header.xml | 5 +++-- .../main/res/values-v31/styles_component.xml | 2 -- app/src/main/res/values/dimens.xml | 19 +++++++++++-------- app/src/main/res/values/styles_component.xml | 7 +------ app/src/main/res/values/styles_ui.xml | 4 ++-- 18 files changed, 39 insertions(+), 50 deletions(-) diff --git a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateDatabase.kt b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateDatabase.kt index 42685da38..d81780b1e 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateDatabase.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/state/PlaybackStateDatabase.kt @@ -23,9 +23,9 @@ import android.content.Context import android.database.sqlite.SQLiteDatabase import android.database.sqlite.SQLiteOpenHelper import androidx.core.database.sqlite.transaction -import org.oxycblt.auxio.ui.queryAll import org.oxycblt.auxio.logD import org.oxycblt.auxio.ui.assertBackgroundThread +import org.oxycblt.auxio.ui.queryAll /** * A SQLite database for managing the persistent playback state and queue. diff --git a/app/src/main/java/org/oxycblt/auxio/ui/AndroidUtils.kt b/app/src/main/java/org/oxycblt/auxio/ui/AndroidUtils.kt index 08791de8e..abdca58b8 100644 --- a/app/src/main/java/org/oxycblt/auxio/ui/AndroidUtils.kt +++ b/app/src/main/java/org/oxycblt/auxio/ui/AndroidUtils.kt @@ -207,7 +207,6 @@ fun Context.newMainIntent(): PendingIntent { fun SQLiteDatabase.queryAll(tableName: String, block: (Cursor) -> R) = query(tableName, null, null, null, null, null, null)?.use(block) - /** * Assert that we are on a background thread. */ diff --git a/app/src/main/res/layout-land/fragment_main.xml b/app/src/main/res/layout-land/fragment_main.xml index 735ce6141..355ddc8a4 100644 --- a/app/src/main/res/layout-land/fragment_main.xml +++ b/app/src/main/res/layout-land/fragment_main.xml @@ -30,7 +30,7 @@ android:animateLayoutChanges="true" android:background="?android:attr/colorBackground" android:baselineAligned="false" - android:elevation="@dimen/elevation_normal" + android:elevation="8dp" android:orientation="horizontal" app:layout_constraintBottom_toBottomOf="parent"> diff --git a/app/src/main/res/layout-land/item_album_header.xml b/app/src/main/res/layout-land/item_album_header.xml index ecec3145a..9317ad359 100644 --- a/app/src/main/res/layout-land/item_album_header.xml +++ b/app/src/main/res/layout-land/item_album_header.xml @@ -26,8 +26,8 @@ - - diff --git a/app/src/main/res/layout/fragment_main.xml b/app/src/main/res/layout/fragment_main.xml index 95a87bd4d..9028f7458 100644 --- a/app/src/main/res/layout/fragment_main.xml +++ b/app/src/main/res/layout/fragment_main.xml @@ -26,7 +26,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:animateLayoutChanges="true" - android:elevation="@dimen/elevation_normal" + android:background="?android:attr/colorBackground" + android:baselineAligned="false" + android:elevation="8dp" android:orientation="vertical" app:layout_constraintBottom_toBottomOf="parent"> @@ -43,7 +45,6 @@ android:layout_height="wrap_content" android:layout_gravity="bottom" android:background="?attr/colorSurface" - android:elevation="0dp" app:elevation="0dp" app:menu="@menu/menu_nav" /> diff --git a/app/src/main/res/layout/item_album_header.xml b/app/src/main/res/layout/item_album_header.xml index 7308c9dea..283e36e8b 100644 --- a/app/src/main/res/layout/item_album_header.xml +++ b/app/src/main/res/layout/item_album_header.xml @@ -26,8 +26,8 @@ @drawable/ui_unbounded_ripple - - - - - - \ No newline at end of file diff --git a/app/src/main/res/values/styles_ui.xml b/app/src/main/res/values/styles_ui.xml index cfeca317e..cec08613d 100644 --- a/app/src/main/res/values/styles_ui.xml +++ b/app/src/main/res/values/styles_ui.xml @@ -27,7 +27,7 @@ @@ -216,6 +216,6 @@ \ No newline at end of file