File tree Expand file tree Collapse file tree 12 files changed +322
-268
lines changed
src/main/java/com/example/android/codelab/animation
java/com/example/android/codelab/animation Expand file tree Collapse file tree 12 files changed +322
-268
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,11 @@ plugins {
2121
2222android {
2323 namespace " com.example.android.codelab.animation"
24- compileSdkVersion 34
24+ compileSdk 34
2525 defaultConfig {
2626 applicationId ' com.example.android.codelab.animation'
2727 minSdkVersion 21
28- targetSdkVersion 33
28+ targetSdk 34
2929 versionCode 1
3030 versionName ' 1.0'
3131 }
@@ -51,17 +51,7 @@ dependencies {
5151 implementation ' androidx.activity:activity-compose:1.8.1'
5252 implementation ' androidx.core:core-ktx:1.12.0'
5353 implementation " androidx.compose.ui:ui"
54- implementation " androidx.compose.material:material "
54+ implementation " androidx.compose.material3:material3 "
5555 implementation " androidx.compose.ui:ui-tooling-preview"
5656 debugImplementation " androidx.compose.ui:ui-tooling"
5757}
58-
59- // Compiler flag to use experimental Compose APIs
60- tasks. withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile ). configureEach {
61- kotlinOptions {
62- jvmTarget = " 1.8"
63- freeCompilerArgs + = [
64- " -opt-in=kotlin.RequiresOptIn"
65- ]
66- }
67- }
Original file line number Diff line number Diff line change @@ -19,13 +19,15 @@ package com.example.android.codelab.animation
1919import android.os.Bundle
2020import androidx.activity.ComponentActivity
2121import androidx.activity.compose.setContent
22+ import androidx.activity.enableEdgeToEdge
2223import com.example.android.codelab.animation.ui.AnimationCodelabTheme
2324import com.example.android.codelab.animation.ui.home.Home
2425
2526class MainActivity : ComponentActivity () {
2627
2728 override fun onCreate (savedInstanceState : Bundle ? ) {
2829 super .onCreate(savedInstanceState)
30+ enableEdgeToEdge()
2931 setContent {
3032 AnimationCodelabTheme {
3133 Home ()
Original file line number Diff line number Diff line change @@ -18,10 +18,11 @@ package com.example.android.codelab.animation.ui
1818
1919import androidx.compose.ui.graphics.Color
2020
21- val Purple100 = Color (0xFFE1BEE7 )
22- val Purple500 = Color (0xFF6200EE )
23- val Purple700 = Color (0xFF3700B3 )
24- val Teal200 = Color (0xFF03DAC5 )
25- val Green300 = Color (0xFF81C784 )
26- val Green800 = Color (0xFF2E7D32 )
2721val Amber600 = Color (0xFFFFB300 )
22+
23+ val Melon = Color (0xFFfec5bb )
24+ val PaleDogwood = Color (0xFFfcd5ce )
25+ val Seashell = Color (0xFFf8edeb )
26+ val Peach = Color (0xFFfec89a )
27+ val Green = Color (0xFFd8e2dc )
28+ val GreenLight = Color (0xFFEBF1EE )
Original file line number Diff line number Diff line change 1616
1717package com.example.android.codelab.animation.ui
1818
19- import androidx.compose.material .MaterialTheme
20- import androidx.compose.material.lightColors
19+ import androidx.compose.material3 .MaterialTheme
20+ import androidx.compose.material3.lightColorScheme
2121import androidx.compose.runtime.Composable
22+ import androidx.compose.ui.graphics.Color
2223
2324@Composable
2425fun AnimationCodelabTheme (content : @Composable () -> Unit ) {
25- val colors = lightColors(
26- primary = Purple500 ,
27- primaryVariant = Purple700 ,
28- secondary = Teal200
26+ val colors = lightColorScheme(
27+ primary = Melon ,
28+ primaryContainer = PaleDogwood ,
29+ onPrimary = Color .Black ,
30+ secondary = Peach ,
31+ onSecondary = Color .Black
2932 )
3033 MaterialTheme (
31- colors = colors,
34+ colorScheme = colors,
3235 content = content
3336 )
34- }
37+ }
You can’t perform that action at this time.
0 commit comments