diff --git a/config/images/10.png b/config/images/10.png
new file mode 100644
index 000000000..8dfb16434
Binary files /dev/null and b/config/images/10.png differ
diff --git a/config/images/9.png b/config/images/9.png
new file mode 100644
index 000000000..9f2bf3eef
Binary files /dev/null and b/config/images/9.png differ
diff --git a/core/ui/src/main/kotlin/org/michaelbel/movies/ui/ktx/ConfigurationKtx.kt b/core/ui/src/main/kotlin/org/michaelbel/movies/ui/ktx/ConfigurationKtx.kt
new file mode 100644
index 000000000..d1fc2aeab
--- /dev/null
+++ b/core/ui/src/main/kotlin/org/michaelbel/movies/ui/ktx/ConfigurationKtx.kt
@@ -0,0 +1,16 @@
+package org.michaelbel.movies.ui.ktx
+
+import android.content.res.Configuration
+import androidx.compose.foundation.layout.WindowInsets
+import androidx.compose.foundation.layout.displayCutout
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.platform.LocalConfiguration
+
+val isPortrait: Boolean
+ @Composable get() {
+ val configuration = LocalConfiguration.current
+ return configuration.orientation == Configuration.ORIENTATION_PORTRAIT
+ }
+
+val displayCutoutWindowInsets: WindowInsets
+ @Composable get() = if (isPortrait) WindowInsets(0, 0, 0, 0) else WindowInsets.displayCutout
\ No newline at end of file
diff --git a/feature/account-impl/src/main/kotlin/org/michaelbel/movies/account/ui/AccountScreenContent.kt b/feature/account-impl/src/main/kotlin/org/michaelbel/movies/account/ui/AccountScreenContent.kt
index 41f9ba320..f3ad45a7c 100644
--- a/feature/account-impl/src/main/kotlin/org/michaelbel/movies/account/ui/AccountScreenContent.kt
+++ b/feature/account-impl/src/main/kotlin/org/michaelbel/movies/account/ui/AccountScreenContent.kt
@@ -31,6 +31,7 @@ import org.michaelbel.movies.persistence.database.entity.AccountDb
import org.michaelbel.movies.persistence.database.ktx.orEmpty
import org.michaelbel.movies.ui.compose.AccountAvatar
import org.michaelbel.movies.ui.icons.MoviesIcons
+import org.michaelbel.movies.ui.ktx.isPortrait
import org.michaelbel.movies.ui.ktx.lettersTextFontSizeLarge
import org.michaelbel.movies.ui.preview.DevicePreviews
import org.michaelbel.movies.ui.theme.MoviesTheme
@@ -64,7 +65,7 @@ internal fun AccountScreenContent(
) {
ConstraintLayout(
modifier
- .padding(horizontal = 16.dp)
+ .padding(horizontal = if (isPortrait) 16.dp else 64.dp)
.fillMaxWidth()
.background(
color = MaterialTheme.colorScheme.primaryContainer,
diff --git a/feature/auth-impl/src/main/kotlin/org/michaelbel/movies/auth/ui/AuthScreenContent.kt b/feature/auth-impl/src/main/kotlin/org/michaelbel/movies/auth/ui/AuthScreenContent.kt
index 5b5757fbe..d37a7a7a8 100644
--- a/feature/auth-impl/src/main/kotlin/org/michaelbel/movies/auth/ui/AuthScreenContent.kt
+++ b/feature/auth-impl/src/main/kotlin/org/michaelbel/movies/auth/ui/AuthScreenContent.kt
@@ -55,6 +55,7 @@ import org.michaelbel.movies.network.TMDB_TERMS_OF_USE
import org.michaelbel.movies.network.TMDB_URL
import org.michaelbel.movies.ui.icons.MoviesIcons
import org.michaelbel.movies.ui.ktx.clickableWithoutRipple
+import org.michaelbel.movies.ui.ktx.isPortrait
@Composable
fun AuthRoute(
@@ -95,7 +96,7 @@ internal fun AuthScreenContent(
ConstraintLayout(
modifier
- .padding(horizontal = 16.dp)
+ .padding(horizontal = if (isPortrait) 16.dp else 64.dp)
.fillMaxWidth()
.background(
color = MaterialTheme.colorScheme.primaryContainer,
diff --git a/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsScreenContent.kt b/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsScreenContent.kt
index 784c4cdd0..62f39209e 100644
--- a/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsScreenContent.kt
+++ b/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsScreenContent.kt
@@ -3,6 +3,7 @@ package org.michaelbel.movies.details.ui
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.TopAppBarDefaults
@@ -23,6 +24,7 @@ import org.michaelbel.movies.network.connectivity.NetworkStatus
import org.michaelbel.movies.network.connectivity.ktx.isAvailable
import org.michaelbel.movies.network.ktx.isFailure
import org.michaelbel.movies.network.ktx.throwable
+import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets
@Composable
fun DetailsRoute(
@@ -78,6 +80,7 @@ private fun DetailsScreenContent(
DetailsLoading(
modifier = Modifier
.padding(paddingValues)
+ .windowInsetsPadding(displayCutoutWindowInsets)
.fillMaxSize()
)
}
@@ -85,6 +88,7 @@ private fun DetailsScreenContent(
DetailsContent(
modifier = Modifier
.padding(paddingValues)
+ .windowInsetsPadding(displayCutoutWindowInsets)
.fillMaxSize(),
movie = detailsState.movie,
onNavigateToGallery = onNavigateToGallery
@@ -94,6 +98,7 @@ private fun DetailsScreenContent(
DetailsFailure(
modifier = Modifier
.padding(paddingValues)
+ .windowInsetsPadding(displayCutoutWindowInsets)
.fillMaxSize()
)
}
diff --git a/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsToolbar.kt b/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsToolbar.kt
index 627c6e3e1..b6becac0a 100644
--- a/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsToolbar.kt
+++ b/feature/details-impl/src/main/kotlin/org/michaelbel/movies/details/ui/DetailsToolbar.kt
@@ -4,6 +4,7 @@ import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.statusBarsPadding
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@@ -16,6 +17,7 @@ import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.tooling.preview.PreviewParameter
import org.michaelbel.movies.ui.icons.MoviesIcons
+import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets
import org.michaelbel.movies.ui.preview.DevicePreviews
import org.michaelbel.movies.ui.preview.provider.TitlePreviewParameterProvider
import org.michaelbel.movies.ui.theme.MoviesTheme
@@ -43,6 +45,7 @@ fun DetailsToolbar(
actions = {
AnimatedVisibility(
visible = movieUrl != null,
+ modifier = Modifier.windowInsetsPadding(displayCutoutWindowInsets),
enter = fadeIn()
) {
if (movieUrl != null) {
@@ -54,9 +57,8 @@ fun DetailsToolbar(
},
navigationIcon = {
IconButton(
- onClick = {
- onNavigationIconClick()
- }
+ onClick = { onNavigationIconClick() },
+ modifier = Modifier.windowInsetsPadding(displayCutoutWindowInsets)
) {
Image(
imageVector = MoviesIcons.ArrowBack,
diff --git a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ktx/ConfigurationKtx.kt b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ktx/ConfigurationKtx.kt
index 81ef773dc..8ecf72d8f 100644
--- a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ktx/ConfigurationKtx.kt
+++ b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ktx/ConfigurationKtx.kt
@@ -1,17 +1,10 @@
package org.michaelbel.movies.feed.ktx
-import android.content.res.Configuration
import androidx.compose.runtime.Composable
-import androidx.compose.ui.platform.LocalConfiguration
+import org.michaelbel.movies.ui.ktx.isPortrait
private const val FEED_GRID_PORTRAIT_COLUMNS_COUNT = 2
private const val FEED_GRID_LANDSCAPE_COLUMNS_COUNT = 4
-val isPortrait: Boolean
- @Composable get() {
- val configuration = LocalConfiguration.current
- return configuration.orientation == Configuration.ORIENTATION_PORTRAIT
- }
-
val gridColumnsCount: Int
@Composable get() = if (isPortrait) FEED_GRID_PORTRAIT_COLUMNS_COUNT else FEED_GRID_LANDSCAPE_COLUMNS_COUNT
\ No newline at end of file
diff --git a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedContent.kt b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedContent.kt
index 57b414a79..c937db40c 100644
--- a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedContent.kt
+++ b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedContent.kt
@@ -25,12 +25,12 @@ import androidx.paging.compose.itemContentType
import androidx.paging.compose.itemKey
import org.michaelbel.movies.common.appearance.FeedView
import org.michaelbel.movies.feed.ktx.gridColumnsCount
-import org.michaelbel.movies.feed.ktx.isPortrait
import org.michaelbel.movies.network.isTmdbApiKeyEmpty
import org.michaelbel.movies.persistence.database.entity.MovieDb
import org.michaelbel.movies.ui.ktx.isNotEmpty
import org.michaelbel.movies.ui.ktx.isPagingFailure
import org.michaelbel.movies.ui.ktx.isPagingLoading
+import org.michaelbel.movies.ui.ktx.isPortrait
@Composable
fun FeedContent(
@@ -58,7 +58,8 @@ fun FeedContent(
lazyGridState = lazyGridState,
pagingItems = pagingItems,
onMovieClick = onMovieClick,
- contentPadding = contentPadding
+ contentPadding = contentPadding,
+ modifier = modifier
)
}
}
diff --git a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedLoading.kt b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedLoading.kt
index 18c8b0332..9c184844a 100644
--- a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedLoading.kt
+++ b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedLoading.kt
@@ -17,9 +17,9 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import org.michaelbel.movies.common.appearance.FeedView
import org.michaelbel.movies.feed.ktx.gridColumnsCount
-import org.michaelbel.movies.feed.ktx.isPortrait
import org.michaelbel.movies.network.model.MovieResponse
import org.michaelbel.movies.persistence.database.entity.MovieDb
+import org.michaelbel.movies.ui.ktx.isPortrait
import org.michaelbel.movies.ui.placeholder.PlaceholderHighlight
import org.michaelbel.movies.ui.placeholder.material3.fade
import org.michaelbel.movies.ui.placeholder.placeholder
diff --git a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedScreenContent.kt b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedScreenContent.kt
index 13abda3e0..c17ce4c1a 100644
--- a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedScreenContent.kt
+++ b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedScreenContent.kt
@@ -10,6 +10,7 @@ import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.grid.LazyGridState
import androidx.compose.foundation.lazy.grid.rememberLazyGridState
@@ -59,6 +60,7 @@ import org.michaelbel.movies.persistence.database.entity.MovieDb
import org.michaelbel.movies.persistence.database.ktx.orEmpty
import org.michaelbel.movies.ui.compose.NotificationBottomSheet
import org.michaelbel.movies.ui.ktx.clickableWithoutRipple
+import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets
import org.michaelbel.movies.ui.ktx.isFailure
import org.michaelbel.movies.ui.ktx.isLoading
import org.michaelbel.movies.ui.ktx.throwable
@@ -206,9 +208,7 @@ private fun FeedScreenContent(
topBar = {
FeedToolbar(
title = currentMovieList.titleText,
- modifier = Modifier
- .fillMaxWidth()
- .clickableWithoutRipple { onScrollToTop() },
+ modifier = Modifier.clickableWithoutRipple { onScrollToTop() },
account = account,
isUpdateIconVisible = isUpdateIconVisible,
onAuthIconClick = {
@@ -234,7 +234,7 @@ private fun FeedScreenContent(
pagingItems.isLoading -> {
FeedLoading(
feedView = currentFeedView,
- modifier = Modifier.fillMaxSize(),
+ modifier = Modifier.windowInsetsPadding(displayCutoutWindowInsets),
paddingValues = paddingValues
)
}
@@ -242,6 +242,7 @@ private fun FeedScreenContent(
FeedFailure(
modifier = Modifier
.padding(paddingValues)
+ .windowInsetsPadding(displayCutoutWindowInsets)
.fillMaxSize()
.clickableWithoutRipple { pagingItems.retry() },
onCheckConnectivityClick = {
@@ -262,7 +263,7 @@ private fun FeedScreenContent(
pagingItems = pagingItems,
onMovieClick = onNavigateToDetails,
contentPadding = paddingValues,
- modifier = Modifier.fillMaxSize()
+ modifier = Modifier.windowInsetsPadding(displayCutoutWindowInsets)
)
}
}
diff --git a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedToolbar.kt b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedToolbar.kt
index d047e021f..9268b57f3 100644
--- a/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedToolbar.kt
+++ b/feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedToolbar.kt
@@ -1,8 +1,10 @@
package org.michaelbel.movies.feed.ui
import androidx.compose.foundation.Image
+import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.statusBarsPadding
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@@ -21,6 +23,7 @@ import org.michaelbel.movies.persistence.database.entity.AccountDb
import org.michaelbel.movies.persistence.database.ktx.isEmpty
import org.michaelbel.movies.ui.compose.AccountAvatar
import org.michaelbel.movies.ui.icons.MoviesIcons
+import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets
import org.michaelbel.movies.ui.ktx.lettersTextFontSizeSmall
import org.michaelbel.movies.ui.preview.DevicePreviews
import org.michaelbel.movies.ui.preview.provider.BooleanPreviewParameterProvider
@@ -42,6 +45,7 @@ fun FeedToolbar(
title = {
Text(
text = title,
+ modifier = Modifier.windowInsetsPadding(displayCutoutWindowInsets),
overflow = TextOverflow.Ellipsis,
maxLines = 1,
style = MaterialTheme.typography.titleLarge.copy(
@@ -51,43 +55,47 @@ fun FeedToolbar(
},
modifier = modifier,
actions = {
- if (isUpdateIconVisible) {
+ Row(
+ modifier = Modifier.windowInsetsPadding(displayCutoutWindowInsets)
+ ) {
+ if (isUpdateIconVisible) {
+ IconButton(
+ onClick = onUpdateIconClick
+ ) {
+ Image(
+ imageVector = MoviesIcons.SystemUpdate,
+ contentDescription = null,
+ colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimaryContainer)
+ )
+ }
+ }
+
IconButton(
- onClick = onUpdateIconClick
+ onClick = onSettingsIconClick
) {
Image(
- imageVector = MoviesIcons.SystemUpdate,
+ imageVector = MoviesIcons.Settings,
contentDescription = null,
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimaryContainer)
)
}
- }
-
- IconButton(
- onClick = onSettingsIconClick
- ) {
- Image(
- imageVector = MoviesIcons.Settings,
- contentDescription = null,
- colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimaryContainer)
- )
- }
- IconButton(
- onClick = if (account.isEmpty) onAuthIconClick else onAccountIconClick
- ) {
- if (account.isEmpty) {
- Image(
- imageVector = MoviesIcons.Account,
- contentDescription = null,
- colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimaryContainer)
- )
- } else {
- AccountAvatar(
- account = account,
- fontSize = account.lettersTextFontSizeSmall,
- modifier = Modifier.size(32.dp)
- )
+ IconButton(
+ onClick = if (account.isEmpty) onAuthIconClick else onAccountIconClick
+ ) {
+ if (account.isEmpty) {
+ Image(
+ imageVector = MoviesIcons.Account,
+ contentDescription = null,
+ colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onPrimaryContainer)
+ )
+ } else {
+ AccountAvatar(
+ account = account,
+ fontSize = account.lettersTextFontSizeSmall,
+ modifier = Modifier.size(32.dp)
+ )
+ }
}
}
},
diff --git a/feature/gallery-impl/src/main/kotlin/org/michaelbel/movies/gallery/ui/GalleryScreenContent.kt b/feature/gallery-impl/src/main/kotlin/org/michaelbel/movies/gallery/ui/GalleryScreenContent.kt
index b3df8586b..87f0346ac 100644
--- a/feature/gallery-impl/src/main/kotlin/org/michaelbel/movies/gallery/ui/GalleryScreenContent.kt
+++ b/feature/gallery-impl/src/main/kotlin/org/michaelbel/movies/gallery/ui/GalleryScreenContent.kt
@@ -11,6 +11,7 @@ import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.statusBarsPadding
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.pager.HorizontalPager
import androidx.compose.foundation.pager.PagerDefaults
import androidx.compose.foundation.pager.PagerScope
@@ -61,6 +62,7 @@ import org.michaelbel.movies.network.isNotOriginal
import org.michaelbel.movies.persistence.database.entity.ImageDb
import org.michaelbel.movies.persistence.database.ktx.original
import org.michaelbel.movies.ui.icons.MoviesIcons
+import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets
import org.michaelbel.movies.work.DownloadImageWorker
@Composable
@@ -260,7 +262,8 @@ private fun GalleryScreenContent(
enter = fadeIn()
) {
IconButton(
- onClick = { onDownloadClick(imageDb) }
+ onClick = { onDownloadClick(imageDb) },
+ modifier = Modifier.windowInsetsPadding(displayCutoutWindowInsets)
) {
Image(
imageVector = MoviesIcons.FileDownload,
@@ -286,6 +289,7 @@ private fun GalleryScreenContent(
top.linkTo(parent.top, 8.dp)
}
.statusBarsPadding()
+ .windowInsetsPadding(displayCutoutWindowInsets)
) {
Image(
imageVector = MoviesIcons.ArrowBack,
diff --git a/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsScreenContent.kt b/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsScreenContent.kt
index 26260f49d..3a783837a 100644
--- a/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsScreenContent.kt
+++ b/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsScreenContent.kt
@@ -9,6 +9,7 @@ import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.navigationBarsPadding
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.rememberLazyListState
@@ -49,6 +50,7 @@ import org.michaelbel.movies.settings_impl.BuildConfig
import org.michaelbel.movies.settings_impl.R
import org.michaelbel.movies.ui.ktx.appNotificationSettingsIntent
import org.michaelbel.movies.ui.ktx.clickableWithoutRipple
+import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets
import org.michaelbel.movies.ui.R as UiR
@Composable
@@ -192,6 +194,7 @@ private fun SettingsScreenContent(
appVersionData = appVersionData,
modifier = Modifier
.navigationBarsPadding()
+ .windowInsetsPadding(displayCutoutWindowInsets)
.fillMaxWidth()
.background(MaterialTheme.colorScheme.primaryContainer)
)
@@ -204,7 +207,9 @@ private fun SettingsScreenContent(
containerColor = MaterialTheme.colorScheme.primaryContainer
) { paddingValues ->
LazyColumn(
- modifier = Modifier.navigationBarsPadding(),
+ modifier = Modifier
+ .navigationBarsPadding()
+ .windowInsetsPadding(displayCutoutWindowInsets),
state = lazyListState,
contentPadding = paddingValues
) {
diff --git a/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsToolbar.kt b/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsToolbar.kt
index 5d49a1bd1..9d9e7d98d 100644
--- a/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsToolbar.kt
+++ b/feature/settings-impl/src/main/kotlin/org/michaelbel/movies/settings/ui/SettingsToolbar.kt
@@ -2,6 +2,7 @@ package org.michaelbel.movies.settings.ui
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.statusBarsPadding
+import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.material3.IconButton
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
@@ -16,6 +17,7 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import org.michaelbel.movies.settings_impl.R
import org.michaelbel.movies.ui.icons.MoviesIcons
+import org.michaelbel.movies.ui.ktx.displayCutoutWindowInsets
import org.michaelbel.movies.ui.preview.DevicePreviews
import org.michaelbel.movies.ui.theme.MoviesTheme
@@ -41,7 +43,9 @@ internal fun SettingsToolbar(
navigationIcon = {
IconButton(
onClick = onNavigationIconClick,
- modifier = Modifier.testTag("BackIconButton")
+ modifier = Modifier
+ .windowInsetsPadding(displayCutoutWindowInsets)
+ .testTag("BackIconButton")
) {
Image(
imageVector = MoviesIcons.ArrowBack,
diff --git a/readme.md b/readme.md
index 8be32119e..a96bce92a 100644
--- a/readme.md
+++ b/readme.md
@@ -17,6 +17,8 @@ Movies - easy way to discover popular movies. This is a simple TMDb client for A
+
+
## Build
@@ -101,6 +103,7 @@ TMDB_API_KEY=your_own_tmdb_api_key
- [x] [Codacy Static Code Analysis](https://app.codacy.com/gh/michaelbel/movies/dashboard)
- [x] [Display Content Edge-to-Edge](https://d.android.com/develop/ui/views/layout/edge-to-edge)
- [x] [Support Landscape Orientation](https://d.android.com/guide/topics/large-screens/support-different-screen-sizes)
+- [x] [Support Display Cutouts](https://d.android.com/jetpack/compose/system/cutouts)
- [ ] [Unit Tests](https://d.android.com/training/testing/local-tests)
- [ ] [UI Tests](https://d.android.com/training/testing/instrumented-tests/ui-tests)
- [ ] [Baseline Profiles](https://d.android.com/topic/performance/baselineprofiles/overview)