diff --git a/README.md b/README.md index c79a2e625..41728c45c 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ Feel free to contribute with [issues](https://github.com/lucasnlm/antimine-andro ## Features - Support to [Android Wear OS](https://developer.android.com/wear) +- Support to [Android Auto](https://www.android.com/auto/) - No guessing algorithm - Multiple themes colors (including dynamic colors and AMOLED) - Multiple skins (including the classic) diff --git a/about/src/main/res/layout/activity_container.xml b/about/src/main/res/layout/activity_container.xml index 5a9c9703a..b3a2ce971 100644 --- a/about/src/main/res/layout/activity_container.xml +++ b/about/src/main/res/layout/activity_container.xml @@ -3,6 +3,8 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" + android:paddingVertical="@dimen/root_vertical_spacing" + android:paddingHorizontal="@dimen/root_horizontal_spacing" android:fitsSystemWindows="true"> diff --git a/about/src/main/res/layout/fragment_licenses.xml b/about/src/main/res/layout/fragment_licenses.xml index 5cd110787..a88ff58d7 100644 --- a/about/src/main/res/layout/fragment_licenses.xml +++ b/about/src/main/res/layout/fragment_licenses.xml @@ -5,6 +5,8 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="false" + android:paddingVertical="@dimen/root_vertical_spacing" + android:paddingHorizontal="@dimen/root_horizontal_spacing" tools:context="dev.lucasnlm.antimine.licenses.LicenseActivity"> diff --git a/app/src/main/res/layout/activity_game.xml b/app/src/main/res/layout/activity_game.xml index e617a89cd..25152f1f2 100644 --- a/app/src/main/res/layout/activity_game.xml +++ b/app/src/main/res/layout/activity_game.xml @@ -30,6 +30,7 @@ android:text="@string/loading" android:textAllCaps="true" android:textStyle="bold" + android:textSize="@dimen/base_font_size" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -72,10 +73,10 @@ @@ -157,7 +158,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" - android:layout_marginEnd="20dp" + android:layout_marginEnd="24dp" android:textSize="12sp" android:textStyle="bold" android:visibility="gone" diff --git a/app/src/main/res/layout/activity_history.xml b/app/src/main/res/layout/activity_history.xml index c200a5016..3f4f4cbe2 100644 --- a/app/src/main/res/layout/activity_history.xml +++ b/app/src/main/res/layout/activity_history.xml @@ -21,6 +21,8 @@ android:layout_width="match_parent" android:layout_height="0dp" android:clipToPadding="false" + android:paddingVertical="@dimen/root_horizontal_spacing" + android:paddingHorizontal="@dimen/root_horizontal_spacing" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/activity_localization.xml b/app/src/main/res/layout/activity_localization.xml index 9a0f6339e..30e6b1e97 100644 --- a/app/src/main/res/layout/activity_localization.xml +++ b/app/src/main/res/layout/activity_localization.xml @@ -21,7 +21,13 @@ android:layout_width="match_parent" android:layout_height="0dp" android:clipToPadding="false" - android:paddingBottom="16dp" + android:paddingHorizontal="@dimen/root_horizontal_spacing" + android:paddingVertical="@dimen/root_vertical_spacing" + android:scrollbarSize="@dimen/base_scrollbar_size" + android:scrollbarStyle="outsideInset" + android:scrollbarAlwaysDrawVerticalTrack="true" + android:scrollbars="vertical" + android:fadeScrollbars="false" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 5d6f1da1d..bff7c6e41 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -25,7 +25,7 @@ android:layout_height="wrap_content" android:animateLayoutChanges="true" android:orientation="vertical" - android:paddingHorizontal="@dimen/main_activity_padding" + android:paddingHorizontal="@dimen/root_horizontal_spacing" android:paddingTop="32dp" android:paddingBottom="48dp"> @@ -110,9 +110,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:gravity="start|center_vertical" - android:paddingHorizontal="18dp" + android:paddingStart="9dp" + android:paddingEnd="18dp" android:text="@string/progressive" - app:icon="@drawable/progressive" /> + app:icon="@drawable/progressive" + app:iconSize="@dimen/base_icon_size" + app:iconPadding="8dp" /> + app:icon="@drawable/fixed_size" + app:iconSize="@dimen/base_icon_size" + app:iconPadding="8dp" /> + app:icon="@drawable/custom" + app:iconSize="@dimen/base_icon_size" + app:iconPadding="8dp" /> diff --git a/app/src/main/res/layout/activity_preferences.xml b/app/src/main/res/layout/activity_preferences.xml index 7c6be351b..51c5814c2 100644 --- a/app/src/main/res/layout/activity_preferences.xml +++ b/app/src/main/res/layout/activity_preferences.xml @@ -29,7 +29,9 @@ + android:layout_height="wrap_content" + android:paddingHorizontal="@dimen/root_horizontal_spacing" + android:paddingVertical="@dimen/root_vertical_spacing"> @@ -74,6 +77,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingVertical="16dp" + android:textSize="@dimen/base_font_size" android:text="@string/sound_effects" /> @@ -137,6 +146,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingVertical="8dp" + android:textSize="@dimen/base_font_size" android:text="@string/settings_gameplay" tools:text="Gameplay" /> @@ -145,6 +155,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingVertical="16dp" + android:textSize="@dimen/base_font_size" android:text="@string/use_question_mark" /> @@ -214,7 +232,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingVertical="16dp" + android:textSize="@dimen/base_font_size" android:text="@string/export_settings" + app:iconSize="@dimen/base_icon_size" app:icon="@drawable/export_file" app:iconGravity="end" /> @@ -223,7 +243,9 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:paddingVertical="16dp" + android:textSize="@dimen/base_font_size" android:text="@string/import_settings" + app:iconSize="@dimen/base_icon_size" app:icon="@drawable/import_file" app:iconGravity="end" /> diff --git a/app/src/main/res/layout/activity_stats.xml b/app/src/main/res/layout/activity_stats.xml index b4944f04f..dfbced184 100644 --- a/app/src/main/res/layout/activity_stats.xml +++ b/app/src/main/res/layout/activity_stats.xml @@ -21,7 +21,8 @@ android:layout_width="match_parent" android:layout_height="0dp" android:clipToPadding="false" - android:paddingBottom="16dp" + android:paddingVertical="@dimen/root_vertical_spacing" + android:paddingHorizontal="@dimen/root_horizontal_spacing" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" diff --git a/app/src/main/res/layout/dialog_custom_game.xml b/app/src/main/res/layout/dialog_custom_game.xml index cb698dabd..ca15a0301 100644 --- a/app/src/main/res/layout/dialog_custom_game.xml +++ b/app/src/main/res/layout/dialog_custom_game.xml @@ -27,13 +27,14 @@ android:id="@+id/map_width" android:layout_width="match_parent" android:layout_height="wrap_content" + android:digits="0123456789" android:gravity="center_horizontal" android:hint="@string/width" android:importantForAutofill="no" android:inputType="number" - android:digits="0123456789" android:minEms="3" android:text="9" + android:textSize="@dimen/base_font_size" tools:ignore="HardcodedText" /> @@ -46,6 +47,7 @@ android:gravity="center" android:includeFontPadding="false" android:text="x" + android:textSize="@dimen/base_font_size" tools:ignore="HardcodedText" /> @@ -93,13 +96,14 @@ android:id="@+id/map_mines" android:layout_width="match_parent" android:layout_height="wrap_content" + android:digits="0123456789" android:gravity="center_horizontal" android:hint="@string/mines" android:importantForAutofill="no" android:inputType="number" - android:digits="0123456789" android:minEms="3" android:text="9" + android:textSize="@dimen/base_font_size" tools:ignore="HardcodedText" /> @@ -112,6 +116,7 @@ android:gravity="center" android:includeFontPadding="false" android:text=" " + android:textSize="@dimen/base_font_size" tools:ignore="HardcodedText" /> diff --git a/app/src/main/res/layout/donation_request.xml b/app/src/main/res/layout/donation_request.xml index 845a4e7a1..d06acde05 100644 --- a/app/src/main/res/layout/donation_request.xml +++ b/app/src/main/res/layout/donation_request.xml @@ -3,9 +3,9 @@ xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?selectableItemBackground" android:clickable="true" android:contentDescription="@string/donation" - android:background="?selectableItemBackground" android:focusable="true" android:padding="16dp"> @@ -36,14 +36,16 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/donate_request" - android:textColor="?colorOnBackground" /> + android:textColor="?colorOnBackground" + android:textSize="@dimen/base_font_size" /> + android:textColor="?colorOnBackground" + android:textSize="@dimen/base_font_size" + android:textStyle="bold" /> \ No newline at end of file diff --git a/app/src/main/res/layout/game_over_dialog.xml b/app/src/main/res/layout/game_over_dialog.xml index 25b001bed..5bb9a5899 100644 --- a/app/src/main/res/layout/game_over_dialog.xml +++ b/app/src/main/res/layout/game_over_dialog.xml @@ -40,6 +40,7 @@ android:gravity="center_horizontal" android:textAlignment="center" android:textAllCaps="true" + android:textSize="@dimen/base_font_size" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -54,6 +55,7 @@ android:gravity="center_horizontal" android:text="@string/you_lost" android:textAlignment="center" + android:textSize="@dimen/base_font_size" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/title" @@ -65,11 +67,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackgroundBorderless" - android:tooltipText="@string/close" android:contentDescription="@string/cancel" android:importantForAccessibility="no" android:padding="8dp" + android:tooltipText="@string/close" app:icon="@drawable/close" + app:iconSize="@dimen/base_icon_size" app:iconTint="?colorOnBackground" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -85,6 +88,7 @@ android:padding="8dp" android:tooltipText="@string/settings" app:icon="@drawable/settings" + app:iconSize="@dimen/base_icon_size" app:iconTint="?colorOnBackground" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -111,6 +115,7 @@ android:text="@string/continue_game" android:textAllCaps="true" android:textColor="?colorSurfaceVariant" + android:textSize="@dimen/base_font_size" app:backgroundTint="?colorAccent" app:iconPadding="0dp" app:iconTint="?colorSurfaceVariant" @@ -124,6 +129,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="4dp" android:textColor="?colorSurfaceVariant" + android:textSize="@dimen/base_font_size" android:textStyle="bold" android:visibility="gone" tools:text="10" @@ -137,6 +143,7 @@ android:layout_height="wrap_content" android:text="@string/new_game" android:textAllCaps="true" + android:textSize="@dimen/base_font_size" app:strokeWidth="0dp"> @@ -149,6 +156,7 @@ android:layout_height="wrap_content" android:text="@string/remove_ad" android:textAllCaps="true" + android:textSize="@dimen/base_font_size" android:visibility="gone" app:strokeWidth="0dp" tools:visibility="visible" /> @@ -160,6 +168,7 @@ android:layout_height="wrap_content" android:text="@string/tutorial" android:textAllCaps="true" + android:textSize="@dimen/base_font_size" android:visibility="gone" app:strokeWidth="0dp" tools:visibility="visible" /> @@ -175,8 +184,8 @@ android:gravity="center" android:minHeight="50dp" android:visibility="gone" - app:layout_constraintStart_toStartOf="@+id/dialog" app:layout_constraintEnd_toEndOf="@+id/dialog" + app:layout_constraintStart_toStartOf="@+id/dialog" app:layout_constraintTop_toBottomOf="@+id/dialog" /> diff --git a/app/src/main/res/layout/music_link.xml b/app/src/main/res/layout/music_link.xml index 351bd4451..715b9beb3 100644 --- a/app/src/main/res/layout/music_link.xml +++ b/app/src/main/res/layout/music_link.xml @@ -38,6 +38,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/check_music" + android:textSize="@dimen/base_font_size" android:textStyle="bold" tools:textColor="?colorOnBackground" /> @@ -46,6 +47,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/music_by" + android:textSize="@dimen/base_font_size" tools:textColor="?colorOnBackground" /> diff --git a/app/src/main/res/layout/view_stats_item.xml b/app/src/main/res/layout/view_stats_item.xml index 3d628a874..0fa13f293 100644 --- a/app/src/main/res/layout/view_stats_item.xml +++ b/app/src/main/res/layout/view_stats_item.xml @@ -44,6 +44,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/games" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -62,6 +64,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/mines" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -80,6 +84,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/total_time" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -98,6 +104,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/average_time" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -116,6 +124,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/shortest_time" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -134,6 +144,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/open_areas" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -152,6 +164,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/performance" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -170,6 +184,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/victories" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> @@ -188,6 +204,7 @@ android:paddingHorizontal="16dp" android:paddingVertical="8dp" android:text="@string/defeats" + android:textSize="@dimen/base_font_size" android:textStyle="bold" /> diff --git a/app/src/main/res/layout/win_dialog.xml b/app/src/main/res/layout/win_dialog.xml index c115bd002..a42b39414 100644 --- a/app/src/main/res/layout/win_dialog.xml +++ b/app/src/main/res/layout/win_dialog.xml @@ -40,6 +40,7 @@ android:gravity="center_horizontal" android:textAlignment="center" android:textAllCaps="true" + android:textSize="@dimen/base_font_size" android:textStyle="bold" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -54,6 +55,7 @@ android:gravity="center_horizontal" android:text="@string/you_lost" android:textAlignment="center" + android:textSize="@dimen/base_font_size" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/title" @@ -67,6 +69,7 @@ android:gravity="center" android:text="@string/you_have_received" android:textAlignment="center" + android:textSize="@dimen/base_font_size" android:visibility="gone" app:drawableEndCompat="@drawable/hint" app:drawableTint="?colorSecondaryVariant" @@ -81,11 +84,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackgroundBorderless" - android:tooltipText="@string/close" android:contentDescription="@string/cancel" android:importantForAccessibility="no" android:padding="8dp" + android:tooltipText="@string/close" app:icon="@drawable/close" + app:iconSize="@dimen/base_icon_size" app:iconTint="?colorOnBackground" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -96,11 +100,12 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="?selectableItemBackgroundBorderless" - android:tooltipText="@string/settings" android:contentDescription="@string/settings" android:importantForAccessibility="no" android:padding="8dp" + android:tooltipText="@string/settings" app:icon="@drawable/settings" + app:iconSize="@dimen/base_icon_size" app:iconTint="?colorOnBackground" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> @@ -123,9 +128,10 @@ android:text="@string/new_game" android:textAllCaps="true" android:textColor="?colorSurfaceVariant" + android:textSize="@dimen/base_font_size" + app:backgroundTint="?colorAccent" app:iconTint="?colorSurfaceVariant" - app:iconTintMode="multiply" - app:backgroundTint="?colorAccent"> + app:iconTintMode="multiply"> @@ -137,6 +143,7 @@ android:layout_height="wrap_content" android:text="@string/events" android:textAllCaps="true" + android:textSize="@dimen/base_font_size" android:visibility="gone" app:strokeWidth="0dp" tools:visibility="visible" /> @@ -148,6 +155,7 @@ android:layout_height="wrap_content" android:text="@string/remove_ad" android:textAllCaps="true" + android:textSize="@dimen/base_font_size" android:visibility="gone" app:strokeWidth="0dp" tools:visibility="visible" /> @@ -163,7 +171,7 @@ android:gravity="center" android:minHeight="50dp" android:visibility="gone" - app:layout_constraintStart_toStartOf="@+id/dialog" app:layout_constraintEnd_toEndOf="@+id/dialog" + app:layout_constraintStart_toStartOf="@+id/dialog" app:layout_constraintTop_toBottomOf="@+id/dialog" /> \ No newline at end of file diff --git a/app/src/test/java/dev/lucasnlm/antimine/mocks/FixedDimensionRepository.kt b/app/src/test/java/dev/lucasnlm/antimine/mocks/FixedDimensionRepository.kt index bf65f23a6..38e6266f4 100644 --- a/app/src/test/java/dev/lucasnlm/antimine/mocks/FixedDimensionRepository.kt +++ b/app/src/test/java/dev/lucasnlm/antimine/mocks/FixedDimensionRepository.kt @@ -1,6 +1,6 @@ package dev.lucasnlm.antimine.mocks -import dev.lucasnlm.antimine.core.models.MinefieldSize +import android.util.DisplayMetrics import dev.lucasnlm.antimine.core.repository.DimensionRepository class FixedDimensionRepository : DimensionRepository { @@ -12,7 +12,12 @@ class FixedDimensionRepository : DimensionRepository { override fun areaSeparator(): Float = 1.0f - override fun displaySize(): MinefieldSize = MinefieldSize(50 * 15, 50 * 30) + override fun displayMetrics(): DisplayMetrics { + return DisplayMetrics().apply { + widthPixels = 50 * 15 + heightPixels = 50 * 30 + } + } override fun actionBarSizeWithStatus(): Int = 50 diff --git a/auto/.gitignore b/auto/.gitignore new file mode 100644 index 000000000..42afabfd2 --- /dev/null +++ b/auto/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/auto/build.gradle.kts b/auto/build.gradle.kts new file mode 100644 index 000000000..01f7ecd11 --- /dev/null +++ b/auto/build.gradle.kts @@ -0,0 +1,34 @@ +plugins { + id("com.android.library") + id("kotlin-android") +} + +android { + namespace = "dev.lucasnlm.antimine.auto" + + defaultConfig { + minSdk = libs.versions.minSdk.get().toInt() + compileSdk = libs.versions.compileSdk.get().toInt() + } + + buildTypes { + release { + isMinifyEnabled = false + setProguardFiles(listOf(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")) + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + buildFeatures { + buildConfig = true + viewBinding = true + } +} diff --git a/auto/consumer-rules.pro b/auto/consumer-rules.pro new file mode 100644 index 000000000..e69de29bb diff --git a/auto/proguard-rules.pro b/auto/proguard-rules.pro new file mode 100644 index 000000000..481bb4348 --- /dev/null +++ b/auto/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/auto/src/main/AndroidManifest.xml b/auto/src/main/AndroidManifest.xml new file mode 100644 index 000000000..2cb7bd422 --- /dev/null +++ b/auto/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/auto/AutoExt.kt b/common/src/main/java/dev/lucasnlm/antimine/common/auto/AutoExt.kt new file mode 100644 index 000000000..9d5e8759e --- /dev/null +++ b/common/src/main/java/dev/lucasnlm/antimine/common/auto/AutoExt.kt @@ -0,0 +1,18 @@ +package dev.lucasnlm.antimine.common.auto + +import android.content.Context +import android.content.pm.PackageManager +import android.os.Build +import androidx.annotation.RequiresApi +import dev.lucasnlm.antimine.utils.BuildExt.androidMarshmallow + +object AutoExt { + fun Context.isAndroidAuto(): Boolean { + return androidMarshmallow() && featureAutomotive() + } + + @RequiresApi(api = Build.VERSION_CODES.M) + private fun Context.featureAutomotive(): Boolean { + return packageManager.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE) + } +} diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryImpl.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryImpl.kt index af476d3bc..8189489e0 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryImpl.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryImpl.kt @@ -24,9 +24,9 @@ class MinefieldRepositoryImpl : MinefieldRepository { VERTICAL_STANDARD_GAP_WITHOUT_BOTTOM } - val display = dimensionRepository.displaySize() - val width = display.width - val height = display.height + val display = dimensionRepository.displayMetrics() + val width = display.widthPixels + val height = display.heightPixels val calculatedWidth = ((width / fieldSize).toInt() - horizontalGap) val calculatedHeight = ((height / fieldSize).toInt() - verticalGap) diff --git a/common/src/main/java/dev/lucasnlm/antimine/common/level/view/GameRenderFragment.kt b/common/src/main/java/dev/lucasnlm/antimine/common/level/view/GameRenderFragment.kt index 0205c510a..b37028203 100644 --- a/common/src/main/java/dev/lucasnlm/antimine/common/level/view/GameRenderFragment.kt +++ b/common/src/main/java/dev/lucasnlm/antimine/common/level/view/GameRenderFragment.kt @@ -19,6 +19,7 @@ import androidx.lifecycle.lifecycleScope import com.badlogic.gdx.Gdx import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration import com.badlogic.gdx.backends.android.AndroidFragmentApplication +import dev.lucasnlm.antimine.common.auto.AutoExt.isAndroidAuto import dev.lucasnlm.antimine.common.level.logic.VisibleMineStream import dev.lucasnlm.antimine.common.level.viewmodel.GameEvent import dev.lucasnlm.antimine.common.level.viewmodel.GameState @@ -279,8 +280,14 @@ open class GameRenderFragment : AndroidFragmentApplication() { } else { context.dpToPx(BOTTOM_MARGIN_WITH_NAV_DP) } + val autoBottomMargin = + if (context.isAndroidAuto()) { + bottomMargin * 1.5 + } else { + bottomMargin + }.toInt() gravity = Gravity.CENTER_HORIZONTAL or Gravity.BOTTOM - setMargins(0, 0, 0, bottomMargin) + setMargins(0, 0, 0, autoBottomMargin) } else { val rightMargin = context.dpToPx(RIGHT_MARGIN_DP) gravity = Gravity.END or Gravity.CENTER_VERTICAL diff --git a/common/src/test/java/dev/lucasnlm/antimine/common/level/logic/MinefieldFactoryTest.kt b/common/src/test/java/dev/lucasnlm/antimine/common/level/logic/MinefieldFactoryTest.kt index aa2abda5f..1ab6bb3b6 100644 --- a/common/src/test/java/dev/lucasnlm/antimine/common/level/logic/MinefieldFactoryTest.kt +++ b/common/src/test/java/dev/lucasnlm/antimine/common/level/logic/MinefieldFactoryTest.kt @@ -1,10 +1,10 @@ package dev.lucasnlm.antimine.common.level.logic +import android.util.DisplayMetrics import com.nhaarman.mockitokotlin2.doReturn import com.nhaarman.mockitokotlin2.mock import dev.lucasnlm.antimine.common.level.repository.MinefieldRepositoryImpl import dev.lucasnlm.antimine.core.models.Difficulty -import dev.lucasnlm.antimine.core.models.MinefieldSize import dev.lucasnlm.antimine.core.repository.DimensionRepository import dev.lucasnlm.antimine.preferences.PreferencesRepository import dev.lucasnlm.antimine.preferences.models.Minefield @@ -83,7 +83,11 @@ class MinefieldFactoryTest { mock { on { areaSize() } doReturn 10.0f on { actionBarSizeWithStatus() } doReturn 10 - on { displaySize() } doReturn MinefieldSize(500, 1000) + on { displayMetrics() } doReturn + DisplayMetrics().apply { + widthPixels = 500 + heightPixels = 1000 + } } MinefieldRepositoryImpl().fromDifficulty( diff --git a/common/src/test/java/dev/lucasnlm/antimine/common/level/mocks/FixedDimensionRepository.kt b/common/src/test/java/dev/lucasnlm/antimine/common/level/mocks/FixedDimensionRepository.kt index 330b32e46..b0ba17994 100644 --- a/common/src/test/java/dev/lucasnlm/antimine/common/level/mocks/FixedDimensionRepository.kt +++ b/common/src/test/java/dev/lucasnlm/antimine/common/level/mocks/FixedDimensionRepository.kt @@ -1,6 +1,6 @@ package dev.lucasnlm.antimine.common.level.mocks -import dev.lucasnlm.antimine.core.models.MinefieldSize +import android.util.DisplayMetrics import dev.lucasnlm.antimine.core.repository.DimensionRepository class FixedDimensionRepository : DimensionRepository { @@ -12,7 +12,12 @@ class FixedDimensionRepository : DimensionRepository { override fun areaSeparator(): Float = 1.0f - override fun displaySize(): MinefieldSize = MinefieldSize(50 * 15, 50 * 30) + override fun displayMetrics(): DisplayMetrics { + return DisplayMetrics().apply { + widthPixels = 50 * 15 + heightPixels = 50 * 30 + } + } override fun actionBarSizeWithStatus(): Int = 55 diff --git a/common/src/test/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryTest.kt b/common/src/test/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryTest.kt index b92bbeecd..b3ae7d6d2 100644 --- a/common/src/test/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryTest.kt +++ b/common/src/test/java/dev/lucasnlm/antimine/common/level/repository/MinefieldRepositoryTest.kt @@ -1,7 +1,7 @@ package dev.lucasnlm.antimine.common.level.repository +import android.util.DisplayMetrics import dev.lucasnlm.antimine.core.models.Difficulty -import dev.lucasnlm.antimine.core.models.MinefieldSize import dev.lucasnlm.antimine.core.repository.DimensionRepository import dev.lucasnlm.antimine.preferences.PreferencesRepository import dev.lucasnlm.antimine.preferences.models.Minefield @@ -29,7 +29,11 @@ class MinefieldRepositoryTest { mockk(relaxed = true) { every { areaSize() } returns 10.0f every { verticalNavigationBarHeight() } returns 0 - every { displaySize() } returns MinefieldSize(1000, 1000) + every { displayMetrics() } returns + DisplayMetrics().apply { + widthPixels = 1000 + heightPixels = 1000 + } } val minefield = @@ -53,7 +57,11 @@ class MinefieldRepositoryTest { mockk(relaxed = true) { every { areaSize() } returns 10.0f every { verticalNavigationBarHeight() } returns 100 - every { displaySize() } returns MinefieldSize(1000, 1000) + every { displayMetrics() } returns + DisplayMetrics().apply { + widthPixels = 1000 + heightPixels = 1000 + } } val minefield = @@ -77,7 +85,11 @@ class MinefieldRepositoryTest { mockk(relaxed = true) { every { areaSize() } returns 10.0f every { verticalNavigationBarHeight() } returns 100 - every { displaySize() } returns MinefieldSize(1000, 1000) + every { displayMetrics() } returns + DisplayMetrics().apply { + widthPixels = 1000 + heightPixels = 1000 + } } val minefield = @@ -101,7 +113,11 @@ class MinefieldRepositoryTest { mockk(relaxed = true) { every { areaSize() } returns 10.0f every { verticalNavigationBarHeight() } returns 100 - every { displaySize() } returns MinefieldSize(1000, 1000) + every { displayMetrics() } returns + DisplayMetrics().apply { + widthPixels = 1000 + heightPixels = 1000 + } } val minefield = diff --git a/control/src/main/res/layout/activity_control.xml b/control/src/main/res/layout/activity_control.xml index 1b5f8fd3d..1002c42c4 100644 --- a/control/src/main/res/layout/activity_control.xml +++ b/control/src/main/res/layout/activity_control.xml @@ -29,8 +29,8 @@ + android:paddingHorizontal="@dimen/root_horizontal_spacing" + android:paddingVertical="@dimen/root_vertical_spacing"> + android:text="@string/touch_sensibility" + android:textSize="@dimen/base_font_size" /> + app:thumbElevation="0dp" + app:tickVisible="false" + app:trackColorInactive="?colorOnSurfaceVariant" + app:trackHeight="@dimen/base_icon_size" /> + android:textColor="?colorOnSurfaceVariant" + android:textSize="@dimen/base_font_size" /> + app:thumbElevation="0dp" + app:tickVisible="false" + app:trackColorInactive="?colorOnSurfaceVariant" + app:trackHeight="@dimen/base_icon_size" /> + android:textColor="?colorOnSurfaceVariant" + android:textSize="@dimen/base_font_size" /> + app:thumbElevation="0dp" + app:tickVisible="false" + app:trackColorInactive="?colorOnSurfaceVariant" + app:trackHeight="@dimen/base_icon_size" /> + android:textColor="?colorOnSurfaceVariant" + android:textSize="@dimen/base_font_size" /> + app:thumbElevation="0dp" + app:tickVisible="false" + app:trackColorInactive="?colorOnSurfaceVariant" + app:trackHeight="@dimen/base_icon_size" /> @@ -255,19 +263,20 @@ android:paddingHorizontal="16dp" android:paddingTop="12dp" android:paddingBottom="20dp" - android:text="@string/default_button" /> + android:text="@string/default_button" + android:textSize="@dimen/base_font_size" /> + android:layout_gravity="center" + android:paddingBottom="16dp"> + android:layout_gravity="center_horizontal" /> diff --git a/control/src/main/res/layout/switch_button.xml b/control/src/main/res/layout/switch_button.xml index b353ca3eb..0903e7281 100644 --- a/control/src/main/res/layout/switch_button.xml +++ b/control/src/main/res/layout/switch_button.xml @@ -35,11 +35,14 @@ @@ -57,10 +60,13 @@ @@ -78,10 +84,13 @@ diff --git a/control/src/main/res/layout/view_control_item.xml b/control/src/main/res/layout/view_control_item.xml index 4e641d03d..54be3926d 100644 --- a/control/src/main/res/layout/view_control_item.xml +++ b/control/src/main/res/layout/view_control_item.xml @@ -43,6 +43,7 @@ android:alpha="1.0" android:gravity="center_horizontal" android:textColor="?colorOnSurfaceVariant" + android:textSize="@dimen/base_font_size" android:textStyle="bold" app:layout_constraintStart_toEndOf="@id/radio" app:layout_constraintTop_toTopOf="parent" @@ -54,6 +55,7 @@ android:layout_height="wrap_content" android:gravity="center_horizontal" android:textColor="?colorOnSurfaceVariant" + android:textSize="@dimen/base_font_size" app:layout_constraintBottom_toBottomOf="@id/firstAction" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/firstAction" @@ -79,6 +81,7 @@ android:alpha="1.0" android:gravity="center_horizontal" android:textColor="?colorOnSurfaceVariant" + android:textSize="@dimen/base_font_size" android:textStyle="bold" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/radio" @@ -91,6 +94,7 @@ android:layout_height="wrap_content" android:gravity="center_horizontal" android:textColor="?colorOnSurfaceVariant" + android:textSize="@dimen/base_font_size" app:layout_constraintBottom_toBottomOf="@id/secondAction" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/secondAction" diff --git a/control/src/main/res/layout/view_control_item_simple.xml b/control/src/main/res/layout/view_control_item_simple.xml index 50e2c643f..230bde9c4 100644 --- a/control/src/main/res/layout/view_control_item_simple.xml +++ b/control/src/main/res/layout/view_control_item_simple.xml @@ -20,7 +20,7 @@ app:layout_constraintTop_toTopOf="parent" app:strokeColor="?colorControlNormal"> - @@ -34,12 +34,13 @@ android:paddingVertical="20dp" android:textColor="?colorOnSurfaceVariant" android:textStyle="bold" + android:textSize="@dimen/base_font_size" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" tools:text="First Action" /> - + diff --git a/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepository.kt b/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepository.kt index 93e6e30f5..d0178bc51 100644 --- a/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepository.kt +++ b/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepository.kt @@ -1,6 +1,6 @@ package dev.lucasnlm.antimine.core.repository -import dev.lucasnlm.antimine.core.models.MinefieldSize +import android.util.DisplayMetrics interface DimensionRepository { fun areaSize(): Float @@ -9,7 +9,7 @@ interface DimensionRepository { fun areaSeparator(): Float - fun displaySize(): MinefieldSize + fun displayMetrics(): DisplayMetrics fun actionBarSizeWithStatus(): Int diff --git a/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepositoryImpl.kt b/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepositoryImpl.kt index 29cf9763c..03620a8c5 100644 --- a/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepositoryImpl.kt +++ b/core/src/main/java/dev/lucasnlm/antimine/core/repository/DimensionRepositoryImpl.kt @@ -5,11 +5,12 @@ import android.content.res.Configuration import android.content.res.Resources import android.content.res.TypedArray import android.os.Build +import android.util.DisplayMetrics import android.view.KeyCharacterMap import android.view.KeyEvent import android.view.ViewConfiguration import dev.lucasnlm.antimine.core.R -import dev.lucasnlm.antimine.core.models.MinefieldSize +import kotlin.math.min class DimensionRepositoryImpl( private val context: Context, @@ -28,7 +29,13 @@ class DimensionRepositoryImpl( } override fun areaSize(): Float { - return displaySize().width / 11.0f + val displayMetrics = displayMetrics() + val minSide = + min( + displayMetrics.widthPixels, + displayMetrics.heightPixels, + ) + return minSide / 11.0f } override fun areaSeparator(): Float { @@ -39,10 +46,9 @@ class DimensionRepositoryImpl( return areaSize() + 2 * areaSeparator() } - override fun displaySize(): MinefieldSize = - with(Resources.getSystem().displayMetrics) { - return MinefieldSize(this.widthPixels, this.heightPixels) - } + override fun displayMetrics(): DisplayMetrics { + return Resources.getSystem().displayMetrics + } override fun actionBarSizeWithStatus(): Int { val styledAttributes: TypedArray = diff --git a/core/src/main/java/dev/lucasnlm/antimine/core/repository/WearDimensionRepositoryImpl.kt b/core/src/main/java/dev/lucasnlm/antimine/core/repository/WearDimensionRepositoryImpl.kt index 528f97c5e..298a855fa 100644 --- a/core/src/main/java/dev/lucasnlm/antimine/core/repository/WearDimensionRepositoryImpl.kt +++ b/core/src/main/java/dev/lucasnlm/antimine/core/repository/WearDimensionRepositoryImpl.kt @@ -2,15 +2,15 @@ package dev.lucasnlm.antimine.core.repository import android.content.Context import android.content.res.Resources +import android.util.DisplayMetrics import dev.lucasnlm.antimine.core.R -import dev.lucasnlm.antimine.core.models.MinefieldSize class WearDimensionRepositoryImpl( private val context: Context, ) : DimensionRepository { override fun areaSize(): Float { - return displaySize().width / 5.0f + return displayMetrics().widthPixels / 5.0f } override fun areaSeparator(): Float { @@ -21,10 +21,9 @@ class WearDimensionRepositoryImpl( return areaSize() + 2 * areaSeparator() } - override fun displaySize(): MinefieldSize = - with(Resources.getSystem().displayMetrics) { - return MinefieldSize(this.widthPixels, this.heightPixels) - } + override fun displayMetrics(): DisplayMetrics { + return Resources.getSystem().displayMetrics + } override fun actionBarSizeWithStatus(): Int { return 0 diff --git a/core/src/main/res/values-land/dimens.xml b/core/src/main/res/values-land/dimens.xml index 534dc8017..90c27d52c 100644 --- a/core/src/main/res/values-land/dimens.xml +++ b/core/src/main/res/values-land/dimens.xml @@ -1,3 +1,4 @@ - 96dp + 16dp + 96dp diff --git a/core/src/main/res/values/dimens.xml b/core/src/main/res/values/dimens.xml index 296af9883..402ac18a3 100644 --- a/core/src/main/res/values/dimens.xml +++ b/core/src/main/res/values/dimens.xml @@ -1,5 +1,6 @@ - 16dp + 4dp + 16dp 38dp 1.5dp diff --git a/donation/src/main/res/layout/activity_donation.xml b/donation/src/main/res/layout/activity_donation.xml index 91a9a14b8..798b4f5c1 100644 --- a/donation/src/main/res/layout/activity_donation.xml +++ b/donation/src/main/res/layout/activity_donation.xml @@ -21,7 +21,7 @@ style="?attr/materialCardViewFilledStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginHorizontal="@dimen/main_activity_padding" + android:layout_marginHorizontal="@dimen/root_horizontal_spacing" android:layout_marginBottom="12dp" app:contentPadding="16dp" app:layout_constraintEnd_toEndOf="parent" @@ -57,7 +57,7 @@ style="?attr/materialCardViewFilledStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginHorizontal="@dimen/main_activity_padding" + android:layout_marginHorizontal="@dimen/root_horizontal_spacing" android:layout_marginTop="16dp" android:layout_marginBottom="12dp" app:contentPadding="16dp" diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 88f4ea1d4..117b8b5f3 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -6,10 +6,10 @@ wearMinSdk = "25" compileSdk = "34" acra = "5.11.2" -activityKtx = "1.8.0" +activityKtx = "1.8.1" amplitude = "2.32.1" appcompat = "1.6.1" -billingKtx = "6.0.1" +billingKtx = "6.1.0" bugsnagAndroid = "5.31.2" constraintlayout = "2.1.4" coreKtx = "1.12.0" @@ -42,9 +42,8 @@ robolectric = "4.5.1" runner = "1.5.2" # Plugins -bugsnag = "8.1.0" -android = "8.1.3" -kotlin = "1.9.10" +android = "8.1.4" +kotlin = "1.9.20" googleServices = "4.4.0" wear = "1.3.0" diff --git a/settings.gradle.kts b/settings.gradle.kts index 130f27322..c6d88aed1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -28,4 +28,5 @@ include( ":audio", ":audio-low", ":utils", + ":auto", ) diff --git a/themes/src/main/java/dev/lucasnlm/antimine/themes/ThemeActivity.kt b/themes/src/main/java/dev/lucasnlm/antimine/themes/ThemeActivity.kt index b259b3d49..da73b6271 100644 --- a/themes/src/main/java/dev/lucasnlm/antimine/themes/ThemeActivity.kt +++ b/themes/src/main/java/dev/lucasnlm/antimine/themes/ThemeActivity.kt @@ -87,15 +87,15 @@ class ThemeActivity : ThemedActivity() { } lifecycleScope.launch { - val size = dimensionRepository.displaySize() + val size = dimensionRepository.displayMetrics() val themesColumns = - if (size.width > size.height) { + if (size.widthPixels > size.heightPixels) { 5 } else { 3 } val skinsColumns = - if (size.width > size.height) { + if (size.widthPixels > size.heightPixels) { 2 } else { 5 @@ -147,7 +147,7 @@ class ThemeActivity : ThemedActivity() { layoutManager = object : GridLayoutManager(context, skinsColumns) { override fun checkLayoutParams(layoutParams: RecyclerView.LayoutParams?): Boolean { - val lpSize = width / (skinsColumns + 1) + val lpSize = binding.skins.measuredWidth / (skinsColumns + 1) layoutParams?.height = lpSize layoutParams?.width = lpSize return true diff --git a/themes/src/main/res/layout-land/activity_theme.xml b/themes/src/main/res/layout-land/activity_theme.xml index 7d8be5685..319031ebf 100644 --- a/themes/src/main/res/layout-land/activity_theme.xml +++ b/themes/src/main/res/layout-land/activity_theme.xml @@ -1,9 +1,9 @@ @@ -22,35 +22,35 @@ android:id="@+id/unlockAll" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingHorizontal="@dimen/main_activity_padding" - android:layout_marginTop="8dp" - app:layout_constraintTop_toBottomOf="@id/toolbar" + android:layout_marginTop="16dp" + android:layout_marginHorizontal="@dimen/root_horizontal_spacing" + app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintEnd_toEndOf="parent"/> + app:layout_constraintTop_toBottomOf="@id/toolbar" /> + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/unlockAll"> + android:overScrollMode="never" + android:requiresFadingEdge="vertical" /> @@ -59,14 +59,14 @@ style="?attr/materialCardViewFilledStyle" android:layout_width="0dp" android:layout_height="0dp" - app:contentPadding="8dp" + android:layout_marginVertical="@dimen/root_vertical_spacing" android:layout_marginStart="8dp" - android:layout_marginEnd="16dp" - android:layout_marginBottom="8dp" - app:layout_constraintTop_toBottomOf="@id/unlockAll" - app:layout_constraintStart_toEndOf="@+id/skinsCard" + android:layout_marginEnd="@dimen/root_horizontal_spacing" + app:contentPadding="8dp" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintBottom_toBottomOf="parent"> + app:layout_constraintStart_toEndOf="@+id/skinsCard" + app:layout_constraintTop_toBottomOf="@id/unlockAll"> + android:overScrollMode="never" + android:requiresFadingEdge="vertical" /> diff --git a/themes/src/main/res/layout/activity_theme.xml b/themes/src/main/res/layout/activity_theme.xml index 900b8ef69..bb46f0e1e 100644 --- a/themes/src/main/res/layout/activity_theme.xml +++ b/themes/src/main/res/layout/activity_theme.xml @@ -23,7 +23,7 @@ style="?attr/materialCardViewFilledStyle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginHorizontal="@dimen/main_activity_padding" + android:layout_marginHorizontal="@dimen/root_horizontal_spacing" android:layout_marginBottom="12dp" android:layout_marginTop="8dp" app:contentPadding="8dp" @@ -48,7 +48,7 @@ android:id="@+id/unlockAll" android:layout_width="match_parent" android:layout_height="wrap_content" - android:paddingHorizontal="@dimen/main_activity_padding" + android:paddingHorizontal="@dimen/root_horizontal_spacing" android:layout_marginTop="16dp" app:layout_constraintEnd_toEndOf="@id/skinsCard" app:layout_constraintStart_toStartOf="@id/skinsCard" diff --git a/themes/src/main/res/values/dimens.xml b/themes/src/main/res/values/dimens.xml index 11e96b91b..e3759945a 100644 --- a/themes/src/main/res/values/dimens.xml +++ b/themes/src/main/res/values/dimens.xml @@ -1,3 +1,3 @@ - 5dp + 8dp diff --git a/tutorial/src/main/res/layout/tutorial_activity.xml b/tutorial/src/main/res/layout/tutorial_activity.xml index 95f0e6b86..21f05f0e6 100644 --- a/tutorial/src/main/res/layout/tutorial_activity.xml +++ b/tutorial/src/main/res/layout/tutorial_activity.xml @@ -21,8 +21,10 @@ android:layout_width="match_parent" android:layout_height="0dp" android:fadeScrollbars="false" - android:paddingHorizontal="@dimen/main_activity_padding" + android:paddingHorizontal="@dimen/root_horizontal_spacing" + android:paddingVertical="@dimen/root_vertical_spacing" android:scrollbarStyle="outsideInset" + android:scrollbarSize="@dimen/base_scrollbar_size" app:layout_constraintBottom_toTopOf="@+id/playGame" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -34,11 +36,12 @@ @@ -62,11 +65,12 @@ @@ -90,11 +94,12 @@ @@ -118,11 +123,12 @@ @@ -147,11 +153,12 @@ @@ -161,8 +168,8 @@ @@ -170,9 +177,9 @@ + + 16dp + 28dp + 28dp + 24sp + false + 16dp + 12dp + 72dp + 64dp + \ No newline at end of file diff --git a/ui/src/main/res/values/specifiq.xml b/ui/src/main/res/values/specifiq.xml new file mode 100644 index 000000000..75a9840d2 --- /dev/null +++ b/ui/src/main/res/values/specifiq.xml @@ -0,0 +1,12 @@ + + + 4dp + 20dp + 24dp + 14sp + true + 8dp + 4dp + 52dp + 52dp + \ No newline at end of file diff --git a/ui/src/main/res/values/themes.xml b/ui/src/main/res/values/themes.xml index 3df5a4fbd..d6f8d5c6e 100644 --- a/ui/src/main/res/values/themes.xml +++ b/ui/src/main/res/values/themes.xml @@ -1,5 +1,10 @@ + + + @@ -37,23 +45,27 @@ @@ -61,6 +73,7 @@ +