diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 30d2e3f..bdfbceb 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -8,11 +8,11 @@ android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/Theme.NanoLedger" + android:windowSoftInputMode="adjustResize" > @@ -23,17 +23,14 @@ diff --git a/app/src/main/java/be/chvp/nanoledger/ui/add/AddActivity.kt b/app/src/main/java/be/chvp/nanoledger/ui/add/AddActivity.kt index 3ba1841..853eb04 100644 --- a/app/src/main/java/be/chvp/nanoledger/ui/add/AddActivity.kt +++ b/app/src/main/java/be/chvp/nanoledger/ui/add/AddActivity.kt @@ -9,6 +9,7 @@ import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import androidx.activity.viewModels +import androidx.compose.foundation.layout.imePadding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Done @@ -30,6 +31,7 @@ import androidx.compose.runtime.livedata.observeAsState import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import be.chvp.nanoledger.R @@ -107,6 +109,7 @@ class AddActivity() : ComponentActivity() { } } }, + modifier = Modifier.imePadding(), ) { contentPadding -> TransactionForm(addViewModel, contentPadding, snackbarHostState) } diff --git a/app/src/main/java/be/chvp/nanoledger/ui/edit/EditActivity.kt b/app/src/main/java/be/chvp/nanoledger/ui/edit/EditActivity.kt index d13bf8a..a837ef0 100644 --- a/app/src/main/java/be/chvp/nanoledger/ui/edit/EditActivity.kt +++ b/app/src/main/java/be/chvp/nanoledger/ui/edit/EditActivity.kt @@ -9,6 +9,7 @@ import androidx.activity.compose.BackHandler import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import androidx.activity.viewModels +import androidx.compose.foundation.layout.imePadding import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material.icons.filled.Done @@ -30,6 +31,7 @@ import androidx.compose.runtime.livedata.observeAsState import androidx.compose.runtime.remember import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.runtime.setValue +import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource import be.chvp.nanoledger.R @@ -109,6 +111,7 @@ class EditActivity() : ComponentActivity() { } } }, + modifier = Modifier.imePadding(), ) { contentPadding -> TransactionForm(editViewModel, contentPadding, snackbarHostState) } diff --git a/app/src/main/java/be/chvp/nanoledger/ui/main/MainActivity.kt b/app/src/main/java/be/chvp/nanoledger/ui/main/MainActivity.kt index d01f7b3..c5eb60f 100644 --- a/app/src/main/java/be/chvp/nanoledger/ui/main/MainActivity.kt +++ b/app/src/main/java/be/chvp/nanoledger/ui/main/MainActivity.kt @@ -15,6 +15,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.text.KeyboardActions @@ -147,6 +148,7 @@ class MainActivity : ComponentActivity() { } } }, + modifier = Modifier.imePadding(), ) { contentPadding -> if (fileUri != null) { MainContent(contentPadding) diff --git a/app/src/main/java/be/chvp/nanoledger/ui/preferences/PreferencesActivity.kt b/app/src/main/java/be/chvp/nanoledger/ui/preferences/PreferencesActivity.kt index b54e951..757c240 100644 --- a/app/src/main/java/be/chvp/nanoledger/ui/preferences/PreferencesActivity.kt +++ b/app/src/main/java/be/chvp/nanoledger/ui/preferences/PreferencesActivity.kt @@ -12,6 +12,7 @@ import androidx.activity.viewModels import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.imePadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.text.KeyboardOptions @@ -85,7 +86,7 @@ class PreferencesActivity() : ComponentActivity() { "," to stringResource(R.string.separator_comma), ) NanoLedgerTheme { - Scaffold(topBar = { Bar() }) { contentPadding -> + Scaffold(topBar = { Bar() }, modifier = Modifier.imePadding()) { contentPadding -> Column( modifier = Modifier