diff --git a/JetLagged/app/build.gradle.kts b/JetLagged/app/build.gradle.kts index d36a207684..9d78e1330f 100644 --- a/JetLagged/app/build.gradle.kts +++ b/JetLagged/app/build.gradle.kts @@ -105,6 +105,7 @@ dependencies { implementation(libs.androidx.lifecycle.viewModelCompose) implementation(libs.androidx.navigation.compose) implementation(libs.androidx.constraintlayout.compose) + implementation(libs.google.android.material) implementation(libs.androidx.compose.runtime) implementation(libs.androidx.compose.foundation) @@ -117,7 +118,6 @@ dependencies { implementation(libs.androidx.compose.ui.tooling.preview) debugImplementation(libs.androidx.compose.ui.tooling) - implementation(libs.accompanist.systemuicontroller) implementation(libs.accompanist.flowlayout) implementation(libs.coil.kt.compose) diff --git a/JetLagged/app/src/main/AndroidManifest.xml b/JetLagged/app/src/main/AndroidManifest.xml index 20251835f3..8549acba30 100644 --- a/JetLagged/app/src/main/AndroidManifest.xml +++ b/JetLagged/app/src/main/AndroidManifest.xml @@ -29,9 +29,9 @@ + android:exported="true" + android:windowSoftInputMode="adjustResize"> diff --git a/JetLagged/app/src/main/java/com/example/jetlagged/MainActivity.kt b/JetLagged/app/src/main/java/com/example/jetlagged/MainActivity.kt index d716180053..c37681da11 100644 --- a/JetLagged/app/src/main/java/com/example/jetlagged/MainActivity.kt +++ b/JetLagged/app/src/main/java/com/example/jetlagged/MainActivity.kt @@ -19,14 +19,14 @@ package com.example.jetlagged import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent -import androidx.core.view.WindowCompat +import androidx.activity.enableEdgeToEdge import com.example.jetlagged.ui.theme.JetLaggedTheme class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { + enableEdgeToEdge() super.onCreate(savedInstanceState) - WindowCompat.setDecorFitsSystemWindows(window, false) setContent { JetLaggedTheme { HomeScreenDrawer() diff --git a/JetLagged/app/src/main/java/com/example/jetlagged/ui/theme/Theme.kt b/JetLagged/app/src/main/java/com/example/jetlagged/ui/theme/Theme.kt index 684094c13f..ec96690ddf 100644 --- a/JetLagged/app/src/main/java/com/example/jetlagged/ui/theme/Theme.kt +++ b/JetLagged/app/src/main/java/com/example/jetlagged/ui/theme/Theme.kt @@ -16,18 +16,11 @@ package com.example.jetlagged.ui.theme -import android.app.Activity -import android.content.Context -import android.content.ContextWrapper import androidx.compose.foundation.shape.CircleShape import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Shapes import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable -import androidx.compose.runtime.SideEffect -import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.platform.LocalView -import androidx.core.view.WindowCompat private val LightColorScheme = lightColorScheme( primary = Yellow, @@ -45,16 +38,6 @@ private val shapes: Shapes fun JetLaggedTheme( content: @Composable () -> Unit, ) { - - val view = LocalView.current - val context = LocalContext.current - if (!view.isInEditMode) { - SideEffect { - WindowCompat.getInsetsController(context.findActivity().window, view) - .isAppearanceLightStatusBars = true - } - } - MaterialTheme( colorScheme = LightColorScheme, typography = Typography, @@ -62,9 +45,3 @@ fun JetLaggedTheme( content = content ) } -private tailrec fun Context.findActivity(): Activity = - when (this) { - is Activity -> this - is ContextWrapper -> this.baseContext.findActivity() - else -> throw IllegalArgumentException("Could not find activity!") - } diff --git a/JetLagged/app/src/main/res/values-v23/themes.xml b/JetLagged/app/src/main/res/values-v23/themes.xml deleted file mode 100644 index 8bc5c0f454..0000000000 --- a/JetLagged/app/src/main/res/values-v23/themes.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - \ No newline at end of file diff --git a/JetLagged/app/src/main/res/values/themes.xml b/JetLagged/app/src/main/res/values/themes.xml index 66abe8148a..04c7301e6c 100644 --- a/JetLagged/app/src/main/res/values/themes.xml +++ b/JetLagged/app/src/main/res/values/themes.xml @@ -13,12 +13,5 @@ the License. --> - - - - +