mirror of
https://github.com/aljazceru/Android-nRF-Toolbox.git
synced 2026-02-01 13:04:18 +01:00
Included navigation insets in layout padding
This commit is contained in:
@@ -9,8 +9,10 @@ import androidx.compose.foundation.layout.WindowInsetsSides
|
||||
import androidx.compose.foundation.layout.displayCutout
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.navigationBars
|
||||
import androidx.compose.foundation.layout.only
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.union
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Add
|
||||
@@ -46,7 +48,8 @@ internal fun HomeView() {
|
||||
Scaffold(
|
||||
topBar = { TitleAppBar(stringResource(id = R.string.app_name)) },
|
||||
contentWindowInsets = WindowInsets.displayCutout
|
||||
.only(WindowInsetsSides.Horizontal),
|
||||
.only(WindowInsetsSides.Horizontal)
|
||||
.union(WindowInsets.navigationBars),
|
||||
floatingActionButton = {
|
||||
ExtendedFloatingActionButton(
|
||||
onClick = { onEvent(UiEvent.OnConnectDeviceClick) },
|
||||
|
||||
@@ -8,8 +8,10 @@ import androidx.compose.foundation.layout.WindowInsetsSides
|
||||
import androidx.compose.foundation.layout.displayCutout
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.imePadding
|
||||
import androidx.compose.foundation.layout.navigationBars
|
||||
import androidx.compose.foundation.layout.only
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.union
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material3.Button
|
||||
@@ -69,7 +71,9 @@ internal fun ProfileScreen() {
|
||||
|
||||
Scaffold(
|
||||
contentWindowInsets = WindowInsets.displayCutout
|
||||
.only(WindowInsetsSides.Horizontal),
|
||||
.only(WindowInsetsSides.Horizontal)
|
||||
.union(WindowInsets.navigationBars),
|
||||
// .only(NavigationS),
|
||||
topBar = {
|
||||
// The device name is derived directly from the current state.
|
||||
val deviceName = (uiState as? ProfileUiState.Connected)
|
||||
|
||||
Reference in New Issue
Block a user