diff --git a/app/build.gradle b/app/build.gradle index a6ff579..c886db7 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,6 +65,7 @@ dependencies { implementation "com.google.accompanist:accompanist-pager:$accompanist" implementation "com.google.accompanist:accompanist-placeholder-material:$accompanist" implementation "com.google.accompanist:accompanist-navigation-animation:$accompanist" + implementation "com.google.accompanist:accompanist-insets:$accompanist" //ViewModel implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version" diff --git a/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/MainActivity.kt b/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/MainActivity.kt index a60e8c9..88301a5 100644 --- a/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/MainActivity.kt +++ b/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/MainActivity.kt @@ -10,6 +10,7 @@ import androidx.compose.material.ExperimentalMaterialApi import androidx.compose.material.MaterialTheme import androidx.compose.material.Surface import androidx.compose.ui.Modifier +import com.google.accompanist.insets.ProvideWindowInsets import com.lacolinares.jetpicexpress.presentation.ui.theme.JetPicExpressTheme import com.lacolinares.jetpicexpress.util.FileHelper import com.lacolinares.jetpicexpress.util.extensions.setTransparentStatusBar @@ -31,14 +32,16 @@ class MainActivity : ComponentActivity() { setTransparentStatusBar() setContent { JetPicExpressTheme { - Surface( - color = MaterialTheme.colors.background, - modifier = Modifier.fillMaxSize() - ) { - Navigation( - activity = this, - fileHelper = fileHelper - ) + ProvideWindowInsets { + Surface( + color = MaterialTheme.colors.background, + modifier = Modifier.fillMaxSize() + ) { + Navigation( + activity = this, + fileHelper = fileHelper + ) + } } } } diff --git a/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/home/HomeScreen.kt b/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/home/HomeScreen.kt index 7c2f313..bc6b298 100644 --- a/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/home/HomeScreen.kt +++ b/app/src/main/java/com/lacolinares/jetpicexpress/presentation/ui/home/HomeScreen.kt @@ -8,6 +8,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource import androidx.compose.ui.unit.dp +import com.google.accompanist.insets.navigationBarsPadding import com.google.accompanist.pager.ExperimentalPagerApi import com.lacolinares.jetpicexpress.R import com.lacolinares.jetpicexpress.presentation.ui.home.components.HomeButtonMenu @@ -26,7 +27,9 @@ fun HomeScreen( navigator: AppNavigator ) { navigator.activity.setTransparentStatusBar() - Box { + Box( + modifier = Modifier.navigationBarsPadding() + ) { MainContent() TopContent(navigator) BottomContent(this, navigator)