Skip to content

Commit 5a9e773

Browse files
committed
Update project
1 parent 6d0ebee commit 5a9e773

5 files changed

Lines changed: 10 additions & 28 deletions

File tree

app/src/main/kotlin/org/michaelbel/aliases/MainActivity.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ class MainActivity: ComponentActivity() {
1313
installSplashScreen()
1414
super.onCreate(savedInstanceState)
1515
enableEdgeToEdge()
16-
setContent {
17-
AppTheme {
18-
MainActivityContent()
19-
}
20-
}
16+
setContent { AppTheme { MainActivityContent() } }
2117
}
2218
}

app/src/main/kotlin/org/michaelbel/aliases/MainActivityContent.kt

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,8 @@ fun MainActivityContent() {
4848

4949
Scaffold(
5050
modifier = Modifier.fillMaxSize(),
51-
topBar = {
52-
TopAppBar(
53-
title = {
54-
Text(
55-
text = stringResource(R.string.app_name)
56-
)
57-
}
58-
)
59-
},
60-
snackbarHost = {
61-
SnackbarHost(
62-
hostState = snackbarHostState
63-
)
64-
}
51+
topBar = { TopAppBar(title = { Text(stringResource(R.string.app_name)) }) },
52+
snackbarHost = { SnackbarHost(snackbarHostState) }
6553
) { innerPadding ->
6654
Row(
6755
modifier = Modifier

app/src/main/kotlin/org/michaelbel/aliases/ui/IconBox.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fun IconBox(
3030
.clip(MaterialTheme.shapes.large)
3131
.border(
3232
width = 1.dp,
33-
color = if (isEnabled) MaterialTheme.colorScheme.tertiaryContainer else Color.Transparent,
33+
color = if (isEnabled) MaterialTheme.colorScheme.primary else Color.Transparent,
3434
shape = MaterialTheme.shapes.large
3535
)
3636
.clickable(onClick = onClick),

app/src/main/kotlin/org/michaelbel/aliases/ui/Theme.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@ package org.michaelbel.aliases.ui
22

33
import androidx.compose.foundation.isSystemInDarkTheme
44
import androidx.compose.material3.MaterialTheme
5-
import androidx.compose.material3.dynamicDarkColorScheme
6-
import androidx.compose.material3.dynamicLightColorScheme
5+
import androidx.compose.material3.darkColorScheme
6+
import androidx.compose.material3.lightColorScheme
77
import androidx.compose.runtime.Composable
8-
import androidx.compose.ui.platform.LocalContext
98

109
@Composable
1110
fun AppTheme(
1211
content: @Composable () -> Unit
1312
) {
14-
val context = LocalContext.current
1513
MaterialTheme(
16-
colorScheme = if (isSystemInDarkTheme()) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context),
14+
colorScheme = if (isSystemInDarkTheme()) darkColorScheme() else lightColorScheme(),
1715
content = content
1816
)
1917
}

gradle/libs.versions.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[versions]
22
min-sdk = "31"
3-
compile-sdk = "35"
4-
target-sdk = "35"
3+
compile-sdk = "36"
4+
target-sdk = "36"
55
jdk = "21"
66
agp = "8.9.1"
77
kotlin = "2.1.20"
88
google-material = "1.12.0"
99
androidx-activity = "1.10.1"
1010
androidx-compose-ui = "1.7.8"
11-
androidx-compose-material3 = "1.3.1"
11+
androidx-compose-material3 = "1.3.2"
1212
androidx-core-splashscreen = "1.0.1"
1313

1414
[libraries]

0 commit comments

Comments
 (0)