From 4c27db73a2a9f96c494d229f121d6a6784f9eb71 Mon Sep 17 00:00:00 2001 From: ibrahimcanaydogan Date: Wed, 13 Nov 2024 00:09:27 +0300 Subject: [PATCH 01/11] build.gradle converted to kts. --- .idea/deploymentTargetSelector.xml | 10 +++ .idea/gradle.xml | 6 +- .idea/misc.xml | 2 +- .idea/runConfigurations.xml | 17 ++++ app/build.gradle | 90 ------------------- app/build.gradle.kts | 87 ++++++++++++++++++ app/proguard-rules.pro | 2 +- .../feature_note/domain/model/Note.kt | 2 +- .../feature_note/presentation/MainActivity.kt | 9 +- .../add_edit_note/AddEditNoteScreen.kt | 20 ++--- .../components/TransparentHintTextField.kt | 2 +- .../presentation/notes/NotesScreen.kt | 19 ++-- .../notes/components/DefaultRadioButton.kt | 14 +-- .../presentation/notes/components/NoteItem.kt | 18 ++-- .../ui/theme/Shape.kt | 2 +- .../ui/theme/Theme.kt | 8 +- .../cleanarchitecturenoteapp/ui/theme/Type.kt | 4 +- app/src/main/res/values-night/themes.xml | 14 --- app/src/main/res/values/themes.xml | 27 +----- build.gradle | 22 ----- build.gradle.kts | 7 ++ gradle.properties | 3 +- gradle/libs.versions.toml | 32 +++++++ gradle/wrapper/gradle-wrapper.properties | 6 +- settings.gradle | 10 --- settings.gradle.kts | 23 +++++ 26 files changed, 236 insertions(+), 220 deletions(-) create mode 100644 .idea/deploymentTargetSelector.xml create mode 100644 .idea/runConfigurations.xml delete mode 100644 app/build.gradle create mode 100644 app/build.gradle.kts delete mode 100644 app/src/main/res/values-night/themes.xml delete mode 100644 build.gradle create mode 100644 build.gradle.kts create mode 100644 gradle/libs.versions.toml delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml new file mode 100644 index 00000000..b268ef36 --- /dev/null +++ b/.idea/deploymentTargetSelector.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml index 526b4c25..ecd50f02 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -4,16 +4,16 @@ diff --git a/.idea/misc.xml b/.idea/misc.xml index 860da66a..d5d35ec4 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 00000000..16660f1d --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,17 @@ + + + + + + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle deleted file mode 100644 index 5ec04ab2..00000000 --- a/app/build.gradle +++ /dev/null @@ -1,90 +0,0 @@ -plugins { - id 'com.android.application' - id 'kotlin-android' - id 'kotlin-kapt' - id 'dagger.hilt.android.plugin' -} - -android { - compileSdk 31 - - defaultConfig { - applicationId "com.plcoding.cleanarchitecturenoteapp" - minSdk 21 - targetSdk 31 - versionCode 1 - versionName "1.0" - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables { - useSupportLibrary true - } - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' - } - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = '1.8' - useIR = true - } - buildFeatures { - compose true - } - composeOptions { - kotlinCompilerExtensionVersion compose_version - kotlinCompilerVersion '1.5.21' - } - packagingOptions { - resources { - excludes += '/META-INF/{AL2.0,LGPL2.1}' - } - } -} - -dependencies { - - implementation 'androidx.core:core-ktx:1.6.0' - implementation 'androidx.appcompat:appcompat:1.3.1' - implementation 'com.google.android.material:material:1.4.0' - implementation "androidx.compose.ui:ui:$compose_version" - implementation "androidx.compose.material:material:$compose_version" - implementation "androidx.compose.ui:ui-tooling-preview:$compose_version" - implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1' - implementation 'androidx.activity:activity-compose:1.3.1' - testImplementation 'junit:junit:4.+' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' - androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" - debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" - - // Compose dependencies - implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0-beta01" - implementation "androidx.navigation:navigation-compose:2.4.0-alpha09" - implementation "androidx.compose.material:material-icons-extended:$compose_version" - implementation "androidx.hilt:hilt-navigation-compose:1.0.0-alpha03" - - // Coroutines - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0' - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1' - - //Dagger - Hilt - implementation "com.google.dagger:hilt-android:2.38.1" - kapt "com.google.dagger:hilt-android-compiler:2.37" - implementation "androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03" - kapt "androidx.hilt:hilt-compiler:1.0.0" - - // Room - implementation "androidx.room:room-runtime:2.3.0" - kapt "androidx.room:room-compiler:2.3.0" - - // Kotlin Extensions and Coroutines support for Room - implementation "androidx.room:room-ktx:2.3.0" -} \ No newline at end of file diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 00000000..c121e9f1 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,87 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.kotlin.android) + alias(libs.plugins.kotlin.compose) + id("kotlin-kapt") + id("com.google.dagger.hilt.android") +} + +android { + namespace = "com.plcoding.cleanarchitecturenoteapp" + compileSdk = 35 + + defaultConfig { + applicationId = "com.plcoding.cleanarchitecturenoteapp" + minSdk = 24 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + kotlinOptions { + jvmTarget = "11" + } + buildFeatures { + compose = true + } +} + +dependencies { + + implementation(libs.androidx.core.ktx) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.activity.compose) + implementation(platform(libs.androidx.compose.bom)) + implementation(libs.androidx.ui) + implementation(libs.androidx.ui.graphics) + implementation(libs.androidx.ui.tooling.preview) + implementation(libs.androidx.material3) + testImplementation(libs.junit) + androidTestImplementation(libs.androidx.junit) + androidTestImplementation(libs.androidx.espresso.core) + androidTestImplementation(platform(libs.androidx.compose.bom)) + androidTestImplementation(libs.androidx.ui.test.junit4) + debugImplementation(libs.androidx.ui.tooling) + debugImplementation(libs.androidx.ui.test.manifest) + + // Compose dependencies + implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0-beta01") + implementation("androidx.navigation:navigation-compose:2.8.3") + implementation("androidx.compose.material:material-icons-extended:1.7.5") + implementation("androidx.hilt:hilt-navigation-compose:1.0.0-alpha03") + + // Coroutines + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.1") + + //Dagger - Hilt + implementation("com.google.dagger:hilt-android:2.49") + kapt("com.google.dagger:hilt-android-compiler:2.49") + kapt("androidx.hilt:hilt-compiler:1.0.0") + + // Room + implementation("androidx.room:room-runtime:2.6.1") + kapt("androidx.room:room-compiler:2.6.1") + + // Kotlin Extensions and Coroutines support for Room + implementation("androidx.room:room-ktx:2.6.1") +} + +kapt { + correctErrorTypes = true +} \ No newline at end of file diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 481bb434..ff59496d 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -1,6 +1,6 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the -# proguardFiles setting in build.gradle. +# proguardFiles setting in build.gradle.kts. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/domain/model/Note.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/domain/model/Note.kt index 68214ccd..b7473f7e 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/domain/model/Note.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/domain/model/Note.kt @@ -4,7 +4,7 @@ import androidx.room.Entity import androidx.room.PrimaryKey import com.plcoding.cleanarchitecturenoteapp.ui.theme.* -@Entity +@Entity(tableName = "note") data class Note( val title: String, val content: String, diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/MainActivity.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/MainActivity.kt index 850240ae..dd194689 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/MainActivity.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/MainActivity.kt @@ -4,11 +4,8 @@ import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent import androidx.compose.animation.ExperimentalAnimationApi -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Surface -import androidx.compose.material.Text -import androidx.compose.runtime.Composable -import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface import androidx.navigation.NavType import androidx.navigation.compose.NavHost import androidx.navigation.compose.composable @@ -28,7 +25,7 @@ class MainActivity : ComponentActivity() { setContent { CleanArchitectureNoteAppTheme { Surface( - color = MaterialTheme.colors.background + color = MaterialTheme.colorScheme.background ) { val navController = rememberNavController() NavHost( diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/AddEditNoteScreen.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/AddEditNoteScreen.kt index b10edd1e..a8542ce0 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/AddEditNoteScreen.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/AddEditNoteScreen.kt @@ -7,7 +7,7 @@ import androidx.compose.foundation.border import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.foundation.shape.CircleShape -import androidx.compose.material.* +import androidx.compose.material3.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Save import androidx.compose.runtime.Composable @@ -36,7 +36,7 @@ fun AddEditNoteScreen( val titleState = viewModel.noteTitle.value val contentState = viewModel.noteContent.value - val scaffoldState = rememberScaffoldState() + val snackbarHostState = remember { SnackbarHostState() } val noteBackgroundAnimatable = remember { Animatable( @@ -49,7 +49,7 @@ fun AddEditNoteScreen( viewModel.eventFlow.collectLatest { event -> when(event) { is AddEditNoteViewModel.UiEvent.ShowSnackbar -> { - scaffoldState.snackbarHostState.showSnackbar( + snackbarHostState.showSnackbar( message = event.message ) } @@ -61,23 +61,23 @@ fun AddEditNoteScreen( } Scaffold( + snackbarHost = { SnackbarHost(snackbarHostState) }, floatingActionButton = { FloatingActionButton( onClick = { viewModel.onEvent(AddEditNoteEvent.SaveNote) }, - backgroundColor = MaterialTheme.colors.primary + containerColor = MaterialTheme.colorScheme.primary ) { Icon(imageVector = Icons.Default.Save, contentDescription = "Save note") } - }, - scaffoldState = scaffoldState - ) { + } + ) { paddingValues -> Column( modifier = Modifier .fillMaxSize() .background(noteBackgroundAnimatable.value) - .padding(16.dp) + .padding(paddingValues) ) { Row( modifier = Modifier @@ -126,7 +126,7 @@ fun AddEditNoteScreen( }, isHintVisible = titleState.isHintVisible, singleLine = true, - textStyle = MaterialTheme.typography.h5 + textStyle = MaterialTheme.typography.headlineSmall ) Spacer(modifier = Modifier.height(16.dp)) TransparentHintTextField( @@ -139,7 +139,7 @@ fun AddEditNoteScreen( viewModel.onEvent(AddEditNoteEvent.ChangeContentFocus(it)) }, isHintVisible = contentState.isHintVisible, - textStyle = MaterialTheme.typography.body1, + textStyle = MaterialTheme.typography.bodyLarge, modifier = Modifier.fillMaxHeight() ) } diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/components/TransparentHintTextField.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/components/TransparentHintTextField.kt index 58f9e0d9..77f262e1 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/components/TransparentHintTextField.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/add_edit_note/components/TransparentHintTextField.kt @@ -3,7 +3,7 @@ package com.plcoding.cleanarchitecturenoteapp.feature_note.presentation.add_edit import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.text.BasicTextField -import androidx.compose.material.Text +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.focus.FocusState diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/NotesScreen.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/NotesScreen.kt index 99724980..08a547f5 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/NotesScreen.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/NotesScreen.kt @@ -5,11 +5,12 @@ import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items -import androidx.compose.material.* +import androidx.compose.material3.* import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Add import androidx.compose.material.icons.filled.Sort import androidx.compose.runtime.Composable +import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -28,26 +29,26 @@ fun NotesScreen( viewModel: NotesViewModel = hiltViewModel() ) { val state = viewModel.state.value - val scaffoldState = rememberScaffoldState() + val snackbarHostState = remember { SnackbarHostState() } val scope = rememberCoroutineScope() Scaffold( + snackbarHost = { SnackbarHost(snackbarHostState) }, floatingActionButton = { FloatingActionButton( onClick = { navController.navigate(Screen.AddEditNoteScreen.route) }, - backgroundColor = MaterialTheme.colors.primary + containerColor = MaterialTheme.colorScheme.primary ) { Icon(imageVector = Icons.Default.Add, contentDescription = "Add note") } - }, - scaffoldState = scaffoldState - ) { + } + ) { paddingValues -> Column( modifier = Modifier .fillMaxSize() - .padding(16.dp) + .padding(paddingValues) ) { Row( modifier = Modifier.fillMaxWidth(), @@ -56,7 +57,7 @@ fun NotesScreen( ) { Text( text = "Your note", - style = MaterialTheme.typography.h4 + style = MaterialTheme.typography.headlineMedium ) IconButton( onClick = { @@ -100,7 +101,7 @@ fun NotesScreen( onDeleteClick = { viewModel.onEvent(NotesEvent.DeleteNote(note)) scope.launch { - val result = scaffoldState.snackbarHostState.showSnackbar( + val result = snackbarHostState.showSnackbar( message = "Note deleted", actionLabel = "Undo" ) diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/DefaultRadioButton.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/DefaultRadioButton.kt index 2f5c5ce3..feb257e8 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/DefaultRadioButton.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/DefaultRadioButton.kt @@ -3,10 +3,10 @@ package com.plcoding.cleanarchitecturenoteapp.feature_note.presentation.notes.co import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.width -import androidx.compose.material.MaterialTheme -import androidx.compose.material.RadioButton -import androidx.compose.material.RadioButtonDefaults -import androidx.compose.material.Text +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.RadioButton +import androidx.compose.material3.RadioButtonDefaults +import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -27,11 +27,11 @@ fun DefaultRadioButton( selected = selected, onClick = onSelect, colors = RadioButtonDefaults.colors( - selectedColor = MaterialTheme.colors.primary, - unselectedColor = MaterialTheme.colors.onBackground + selectedColor = MaterialTheme.colorScheme.primary, + unselectedColor = MaterialTheme.colorScheme.onBackground ) ) Spacer(modifier = Modifier.width(8.dp)) - Text(text = text, style = MaterialTheme.typography.body1) + Text(text = text, style = MaterialTheme.typography.bodyLarge) } } \ No newline at end of file diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/NoteItem.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/NoteItem.kt index 6be437c9..790d0af4 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/NoteItem.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/feature_note/presentation/notes/components/NoteItem.kt @@ -2,10 +2,10 @@ package com.plcoding.cleanarchitecturenoteapp.feature_note.presentation.notes.co import androidx.compose.foundation.Canvas import androidx.compose.foundation.layout.* -import androidx.compose.material.Icon -import androidx.compose.material.IconButton -import androidx.compose.material.MaterialTheme -import androidx.compose.material.Text +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Delete import androidx.compose.runtime.Composable @@ -67,16 +67,16 @@ fun NoteItem( ) { Text( text = note.title, - style = MaterialTheme.typography.h6, - color = MaterialTheme.colors.onSurface, + style = MaterialTheme.typography.headlineSmall, + color = MaterialTheme.colorScheme.onSurface, maxLines = 1, overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.height(8.dp)) Text( text = note.content, - style = MaterialTheme.typography.body1, - color = MaterialTheme.colors.onSurface, + style = MaterialTheme.typography.bodyLarge, + color = MaterialTheme.colorScheme.onSurface, maxLines = 10, overflow = TextOverflow.Ellipsis ) @@ -88,7 +88,7 @@ fun NoteItem( Icon( imageVector = Icons.Default.Delete, contentDescription = "Delete note", - tint = MaterialTheme.colors.onSurface + tint = MaterialTheme.colorScheme.onSurface ) } } diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Shape.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Shape.kt index 3a70048a..1f872ff6 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Shape.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Shape.kt @@ -1,7 +1,7 @@ package com.plcoding.cleanarchitecturenoteapp.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/com/plcoding/cleanarchitecturenoteapp/ui/theme/Theme.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Theme.kt index 24a1508f..2c6e1c67 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Theme.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Theme.kt @@ -1,11 +1,11 @@ package com.plcoding.cleanarchitecturenoteapp.ui.theme -import androidx.compose.material.MaterialTheme -import androidx.compose.material.darkColors +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.darkColorScheme import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color -private val DarkColorPalette = darkColors( +private val DarkColorPalette = darkColorScheme( primary = Color.White, background = DarkGray, onBackground = Color.White, @@ -16,7 +16,7 @@ private val DarkColorPalette = darkColors( @Composable fun CleanArchitectureNoteAppTheme(darkTheme: Boolean = true, content: @Composable() () -> Unit) { MaterialTheme( - colors = DarkColorPalette, + colorScheme = DarkColorPalette, typography = Typography, shapes = Shapes, content = content diff --git a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Type.kt b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Type.kt index 4db73a88..e4befb58 100644 --- a/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Type.kt +++ b/app/src/main/java/com/plcoding/cleanarchitecturenoteapp/ui/theme/Type.kt @@ -1,6 +1,6 @@ package com.plcoding.cleanarchitecturenoteapp.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 diff --git a/app/src/main/res/values-night/themes.xml b/app/src/main/res/values-night/themes.xml deleted file mode 100644 index 423caff1..00000000 --- a/app/src/main/res/values-night/themes.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - \ No newline at end of file diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index c2739918..3d0dccbe 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -1,26 +1,3 @@ - - - - - - -