diff --git a/app/src/main/java/dev/medzik/librepass/android/MainActivity.kt b/app/src/main/java/dev/medzik/librepass/android/MainActivity.kt index 08da5fbb..bf26796b 100644 --- a/app/src/main/java/dev/medzik/librepass/android/MainActivity.kt +++ b/app/src/main/java/dev/medzik/librepass/android/MainActivity.kt @@ -4,6 +4,7 @@ import android.os.Bundle import android.util.Log import androidx.activity.compose.setContent import androidx.compose.foundation.isSystemInDarkTheme +import androidx.core.view.WindowCompat import androidx.fragment.app.FragmentActivity import androidx.navigation.NavController import dev.medzik.android.components.navigate @@ -24,6 +25,8 @@ class MainActivity : FragmentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + WindowCompat.setDecorFitsSystemWindows(window, false) + // handle uncaught exceptions Thread.setDefaultUncaughtExceptionHandler { _, e -> Log.e("LibrePass", "Uncaught exception", e) diff --git a/app/src/main/java/dev/medzik/librepass/android/ui/Navigation.kt b/app/src/main/java/dev/medzik/librepass/android/ui/Navigation.kt index f496347b..e5f6fb46 100644 --- a/app/src/main/java/dev/medzik/librepass/android/ui/Navigation.kt +++ b/app/src/main/java/dev/medzik/librepass/android/ui/Navigation.kt @@ -3,6 +3,7 @@ package dev.medzik.librepass.android.ui import android.app.Activity import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Add @@ -273,6 +274,7 @@ fun LibrePassNavigation() { NavHost( navController, startDestination = getStartRoute(), + modifier = Modifier.imePadding() ) { for (screen in Screen.values()) { composable(screen.getRoute()) { @@ -281,7 +283,7 @@ fun LibrePassNavigation() { } else { Scaffold( topBar = { screen.topBar(navController) }, - floatingActionButton = { screen.floatingActionButton(navController) }, + floatingActionButton = { screen.floatingActionButton(navController) } ) { innerPadding -> Column( modifier = Modifier diff --git a/app/src/main/java/dev/medzik/librepass/android/ui/theme/Theme.kt b/app/src/main/java/dev/medzik/librepass/android/ui/theme/Theme.kt index d81c5693..3f7222fd 100644 --- a/app/src/main/java/dev/medzik/librepass/android/ui/theme/Theme.kt +++ b/app/src/main/java/dev/medzik/librepass/android/ui/theme/Theme.kt @@ -2,7 +2,6 @@ package dev.medzik.librepass.android.ui.theme import android.os.Build import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.imePadding import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface import androidx.compose.material3.darkColorScheme @@ -131,9 +130,7 @@ fun LibrePassTheme( ) { Surface( color = MaterialTheme.colorScheme.surface, - modifier = Modifier - .fillMaxSize() - .imePadding(), + modifier = Modifier.fillMaxSize(), content = content ) }