Integrated fixes from release v3.2.1, updated dependencies

This commit is contained in:
Arty Bishop committed 2025-12-27 15:01:47 +00:00
1 parent 2e5a15eec7
commit 10fc88364f
4 files changed
+51 -21

No files matched your search

+3
View File
@@ -34,6 +34,9 @@ android {
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
} }
} }
androidResources {
generateLocaleConfig = true
}
} }
dependencies { dependencies {
@@ -1,5 +1,6 @@
package com.rtbishop.look4sat.presentation package com.rtbishop.look4sat.presentation
import android.os.Build
import androidx.activity.ComponentActivity import androidx.activity.ComponentActivity
import androidx.compose.foundation.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
@@ -44,6 +45,10 @@ fun MainTheme(isDarkTheme: Boolean = isSystemInDarkTheme(), content: @Composable
val window = (view.context as ComponentActivity).window val window = (view.context as ComponentActivity).window
val insetsController = WindowCompat.getInsetsController(window, view) val insetsController = WindowCompat.getInsetsController(window, view)
insetsController.isAppearanceLightStatusBars = false insetsController.isAppearanceLightStatusBars = false
insetsController.isAppearanceLightNavigationBars = false
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
window.isNavigationBarContrastEnforced = false
}
} }
MaterialTheme(colorScheme, shapes, typography, content) MaterialTheme(colorScheme, shapes, typography, content)
} }
@@ -3,6 +3,7 @@ package com.rtbishop.look4sat.presentation.common
import androidx.compose.foundation.MarqueeSpacing import androidx.compose.foundation.MarqueeSpacing
import androidx.compose.foundation.background import androidx.compose.foundation.background
import androidx.compose.foundation.basicMarquee import androidx.compose.foundation.basicMarquee
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Box
@@ -17,7 +18,6 @@ import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.layout.statusBarsPadding
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
import androidx.compose.material3.CardDefaults import androidx.compose.material3.CardDefaults
import androidx.compose.material3.CircularProgressIndicator import androidx.compose.material3.CircularProgressIndicator
@@ -201,11 +201,9 @@ fun CardButton(onClick: () -> Unit, text: String, modifier: Modifier = Modifier)
} }
@Composable @Composable
fun IconCard(action: () -> Unit, resId: Int, modifier: Modifier = Modifier, main: Boolean = false) { fun IconCard(action: () -> Unit, resId: Int, modifier: Modifier = Modifier) {
val clickableMod = Modifier.clickable { action() } val clickableMod = Modifier.clickable { action() }
val defaultC = CardDefaults.elevatedCardColors() ElevatedCard(modifier = Modifier.size(48.dp)) {
val mainC = CardDefaults.elevatedCardColors(containerColor = MaterialTheme.colorScheme.primary)
ElevatedCard(modifier = Modifier.size(48.dp), colors = if (main) mainC else defaultC, shape = CircleShape) {
Box(modifier = clickableMod.fillMaxSize(), contentAlignment = Alignment.Center) { Box(modifier = clickableMod.fillMaxSize(), contentAlignment = Alignment.Center) {
Icon(painter = painterResource(resId), contentDescription = null, modifier = modifier) Icon(painter = painterResource(resId), contentDescription = null, modifier = modifier)
} }
@@ -331,6 +329,27 @@ fun ScreenColumn(floatingBar: @Composable () -> Unit = {}, content: @Composable
} }
} }
@Composable
fun PrimaryButton(action: () -> Unit, resId: Int, modifier: Modifier = Modifier) {
val clickableMod = modifier.clickable { action() }
val colors = CardDefaults.cardColors(containerColor = MaterialTheme.colorScheme.primary)
ElevatedCard(modifier = Modifier.size(96.dp, 48.dp), colors = colors, shape = MaterialTheme.shapes.large) {
Box(modifier = clickableMod.fillMaxSize(), contentAlignment = Alignment.Center) {
Icon(painter = painterResource(resId), contentDescription = null)
}
}
}
@Composable
fun SecondaryButton(action: () -> Unit, resId: Int, modifier: Modifier = Modifier) {
val clickableMod = modifier.clickable { action() }
ElevatedCard(modifier = Modifier.size(48.dp), shape = MaterialTheme.shapes.large) {
Box(modifier = clickableMod.fillMaxSize(), contentAlignment = Alignment.Center) {
Icon(painter = painterResource(resId), contentDescription = null)
}
}
}
@Composable @Composable
fun FloatingBar( fun FloatingBar(
startAction: () -> Unit, startIconResId: Int, startAction: () -> Unit, startIconResId: Int,
@@ -340,17 +359,18 @@ fun FloatingBar(
val spacing = LocalSpacing.current val spacing = LocalSpacing.current
Surface( Surface(
color = MaterialTheme.colorScheme.background, color = MaterialTheme.colorScheme.background,
shape = CircleShape, shape = MaterialTheme.shapes.extraLarge,
modifier = Modifier.padding(bottom = spacing.large) modifier = Modifier.padding(bottom = spacing.medium)
.border(width = 1.dp, color = MaterialTheme.colorScheme.surfaceVariant, shape = MaterialTheme.shapes.extraLarge)
) { ) {
Row( Row(
horizontalArrangement = Arrangement.spacedBy(spacing.medium), horizontalArrangement = Arrangement.spacedBy(spacing.medium),
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.padding(spacing.medium) modifier = Modifier.padding(horizontal = spacing.large, vertical = spacing.medium)
) { ) {
IconCard(action = startAction, resId = startIconResId) SecondaryButton(action = startAction, resId = startIconResId)
IconCard(action = centerAction, resId = centerIconResId, main = true) PrimaryButton(action = centerAction, resId = centerIconResId)
IconCard(action = endAction, resId = endIconResId) SecondaryButton(action = endAction, resId = endIconResId)
} }
} }
} }
+12 -10
View File
@@ -1,16 +1,17 @@
[versions] [versions]
android-gradle-plugin = "8.12.2" android-gradle-plugin = "8.13.0"
google-ksp = "2.2.10-2.0.2" google-ksp = "2.2.20-2.0.2"
kotlin = "2.2.10" kotlin = "2.2.20"
androidx-core-ktx = "1.17.0" androidx-core-ktx = "1.17.0"
androidx-core-splashscreen = "1.0.1" androidx-core-splashscreen = "1.0.1"
androidx-room = "2.7.2" androidx-room = "2.8.0"
compose-bom = "2025.08.01" compose-bom = "2025.09.00"
compose-activity = "1.10.1" compose-activity = "1.11.0"
compose-lifecycle = "2.9.3" compose-lifecycle = "2.9.3"
compose-navigation = "2.9.3" #compose-material3 = "1.4.0-rc01"
compose-navigation = "2.9.4"
other-coroutines = "1.10.2" other-coroutines = "1.10.2"
other-json = "20250517" other-json = "20250517"
@@ -39,6 +40,7 @@ compose-tooling = { group = "androidx.compose.ui", name = "ui-tooling" }
compose-activity = { module = "androidx.activity:activity-compose", version.ref = "compose-activity" } compose-activity = { module = "androidx.activity:activity-compose", version.ref = "compose-activity" }
compose-lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "compose-lifecycle" } compose-lifecycle = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "compose-lifecycle" }
#compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "compose-navigation" } compose-navigation = { module = "androidx.navigation:navigation-compose", version.ref = "compose-navigation" }
compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "compose-lifecycle" } compose-viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "compose-lifecycle" }
@@ -67,9 +69,9 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
[bundles] [bundles]
composeAll = [ composeAll = [
"compose-animation", "compose-runtime", "compose-tooling", "compose-activity", "compose-animation", "compose-runtime", "compose-tooling",
"compose-lifecycle", "compose-material3", "compose-material3-adaptive", "compose-activity", "compose-lifecycle", "compose-material3",
"compose-navigation", "compose-viewmodel" "compose-material3-adaptive", "compose-navigation", "compose-viewmodel"
] ]
composeDebug = ["compose-debug-manifest", "compose-debug-tooling"] composeDebug = ["compose-debug-manifest", "compose-debug-tooling"]
unitTest = ["test-coroutines", "test-junit4", "test-mockk"] unitTest = ["test-coroutines", "test-junit4", "test-mockk"]