-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e39dd0
commit d545047
Showing
21 changed files
with
637 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
core/ui/src/main/kotlin/org/michaelbel/movies/ui/preview/DeviceLandscapePreviews.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.michaelbel.movies.ui.preview | ||
|
||
import android.content.res.Configuration | ||
import androidx.compose.ui.tooling.preview.Preview | ||
|
||
@Preview( | ||
name = "Day Landscape", | ||
uiMode = Configuration.UI_MODE_NIGHT_NO, | ||
widthDp = 800, | ||
heightDp = 360 | ||
) | ||
@Preview( | ||
name = "Night Landscape", | ||
uiMode = Configuration.UI_MODE_NIGHT_YES, | ||
widthDp = 800, | ||
heightDp = 360 | ||
) | ||
annotation class DeviceLandscapePreviews |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
core/ui/src/main/kotlin/org/michaelbel/movies/ui/preview/DeviceUserPreviews.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.michaelbel.movies.ui.preview | ||
|
||
import android.content.res.Configuration | ||
import androidx.compose.ui.tooling.preview.Preview | ||
|
||
@Preview( | ||
name = "Day", | ||
uiMode = Configuration.UI_MODE_NIGHT_NO | ||
) | ||
@Preview( | ||
name = "Night", | ||
uiMode = Configuration.UI_MODE_NIGHT_YES | ||
) | ||
@Preview( | ||
name = "Day Landscape", | ||
uiMode = Configuration.UI_MODE_NIGHT_NO, | ||
widthDp = 800, | ||
heightDp = 360 | ||
) | ||
@Preview( | ||
name = "Night Landscape", | ||
uiMode = Configuration.UI_MODE_NIGHT_YES, | ||
widthDp = 800, | ||
heightDp = 360 | ||
) | ||
annotation class DeviceUserPreviews |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ktx/ConfigurationKtx.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.michaelbel.movies.feed.ktx | ||
|
||
import android.content.res.Configuration | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.platform.LocalConfiguration | ||
|
||
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 |
62 changes: 0 additions & 62 deletions
62
feature/feed-impl/src/main/kotlin/org/michaelbel/movies/feed/ui/FeedCellLoading.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.