diff --git a/app/build.gradle b/app/build.gradle index 2e3c1c1..27fdae8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -59,16 +59,16 @@ android { dependencies { implementation 'androidx.core:core-ktx:1.13.1' - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.3' - implementation 'androidx.activity:activity-compose:1.9.0' + implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.4' + implementation 'androidx.activity:activity-compose:1.9.1' implementation "androidx.compose.ui:ui:$compose_ui_version" implementation "androidx.compose.ui:ui-tooling-preview:$compose_ui_version" - implementation 'androidx.compose.material:material:1.6.8' + implementation "androidx.compose.material3:material3:1.2.1" implementation 'androidx.test:core-ktx:1.6.1' implementation 'com.google.ar:core:1.44.0' testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.5' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' + androidTestImplementation 'androidx.test.ext:junit:1.2.1' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' // Testing androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_ui_version" @@ -79,7 +79,7 @@ dependencies { // Mockito testing testImplementation "org.mockito.kotlin:mockito-kotlin:3.2.0" testImplementation "org.robolectric:robolectric:4.4" - testImplementation "androidx.test.ext:junit-ktx:1.1.5" + testImplementation "androidx.test.ext:junit-ktx:1.2.1" testImplementation 'org.powermock:powermock-api-mockito:1.4.12' testImplementation 'org.powermock:powermock-module-junit4:1.6.2' diff --git a/app/src/main/java/be/re/writand/MainActivity.kt b/app/src/main/java/be/re/writand/MainActivity.kt index b68edbc..98f24ac 100644 --- a/app/src/main/java/be/re/writand/MainActivity.kt +++ b/app/src/main/java/be/re/writand/MainActivity.kt @@ -4,9 +4,9 @@ import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.tooling.preview.Preview @@ -20,7 +20,7 @@ class MainActivity : ComponentActivity() { // A surface container using the 'background' color from the theme Surface( modifier = Modifier.fillMaxSize(), - color = MaterialTheme.colors.primary + color = MaterialTheme.colorScheme.primary ) { Greeting("Android") } diff --git a/app/src/main/java/be/re/writand/screens/.keep b/app/src/main/java/be/re/writand/screens/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/app/src/main/java/be/re/writand/screens/components/Buttons.kt b/app/src/main/java/be/re/writand/screens/components/Buttons.kt index 2f8f734..990ebbd 100644 --- a/app/src/main/java/be/re/writand/screens/components/Buttons.kt +++ b/app/src/main/java/be/re/writand/screens/components/Buttons.kt @@ -2,9 +2,9 @@ package be.re.writand.screens.components import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Button -import androidx.compose.material.ButtonDefaults -import androidx.compose.material.Text +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color @@ -25,7 +25,7 @@ fun WButton( ) { Button( onClick = onClick, - colors = ButtonDefaults.buttonColors(backgroundColor = MainGreen), + colors = ButtonDefaults.buttonColors(containerColor = MainGreen), shape = RoundedCornerShape(10.dp), enabled = enabled ) { diff --git a/app/src/main/java/be/re/writand/ui/theme/Shape.kt b/app/src/main/java/be/re/writand/ui/theme/Shape.kt index eb47f07..2ae2965 100644 --- a/app/src/main/java/be/re/writand/ui/theme/Shape.kt +++ b/app/src/main/java/be/re/writand/ui/theme/Shape.kt @@ -1,7 +1,7 @@ package be.re.writand.ui.theme import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material.Shapes +import androidx.compose.material3.Shapes import androidx.compose.ui.unit.dp val Shapes = Shapes( diff --git a/app/src/main/java/be/re/writand/ui/theme/Theme.kt b/app/src/main/java/be/re/writand/ui/theme/Theme.kt index a791cfc..1279751 100644 --- a/app/src/main/java/be/re/writand/ui/theme/Theme.kt +++ b/app/src/main/java/be/re/writand/ui/theme/Theme.kt @@ -1,23 +1,23 @@ package be.re.writand.ui.theme import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material.MaterialTheme -import androidx.compose.material.darkColors -import androidx.compose.material.lightColors +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme +import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color -private val DarkColorPalette = darkColors( +private val DarkColorPalette = darkColorScheme( primary = MainGrey, - primaryVariant = VariantDarkGrey, - secondary = MainGreen, + secondary = VariantDarkGrey, + tertiary = MainGreen, onBackground = Color.White ) -private val LightColorPalette = lightColors( +private val LightColorPalette = lightColorScheme( primary = Color.White, - primaryVariant = VariantLightGrey, - secondary = MainGreen, + secondary = VariantLightGrey, + tertiary = MainGreen, onBackground = Color.Black /* Other default colors to override @@ -39,7 +39,7 @@ fun WritandTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composabl } MaterialTheme( - colors = colors, + colorScheme = colors, typography = Typography, shapes = Shapes, content = content, diff --git a/app/src/main/java/be/re/writand/ui/theme/Type.kt b/app/src/main/java/be/re/writand/ui/theme/Type.kt index e9b41b4..5246676 100644 --- a/app/src/main/java/be/re/writand/ui/theme/Type.kt +++ b/app/src/main/java/be/re/writand/ui/theme/Type.kt @@ -1,6 +1,6 @@ package be.re.writand.ui.theme -import androidx.compose.material.Typography +import androidx.compose.material3.Typography import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.font.FontFamily import androidx.compose.ui.text.font.FontWeight @@ -8,7 +8,7 @@ import androidx.compose.ui.unit.sp // Set of Material typography styles to start with val Typography = Typography( - body1 = TextStyle( + bodyLarge = TextStyle( fontFamily = FontFamily.Default, fontWeight = FontWeight.Normal, fontSize = 16.sp