Skip to content

Commit

Permalink
Use device preset for previewing welcome screen
Browse files Browse the repository at this point in the history
  • Loading branch information
ovitrif committed Nov 9, 2022
1 parent bace31c commit 809738d
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import androidx.compose.ui.graphics.Shape
import androidx.compose.ui.layout.SubcomposeLayout
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.semantics.clearAndSetSemantics
import androidx.compose.ui.tooling.preview.Devices
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.Dp
Expand Down Expand Up @@ -206,8 +207,8 @@ private val previewUiState = UiState.Content.Welcome(
secondaryActionButton = WelcomeSecondaryButton {},
)

@Preview(showBackground = true, widthDp = 414, heightDp = 897)
@Preview(showBackground = true, widthDp = 414, heightDp = 897, uiMode = Configuration.UI_MODE_NIGHT_YES)
@Preview(showBackground = true, device = Devices.PIXEL_4_XL)
@Preview(showBackground = true, device = Devices.PIXEL_4_XL, uiMode = Configuration.UI_MODE_NIGHT_YES)
@Composable
private fun PreviewWelcomeStep() {
AppTheme {
Expand All @@ -217,8 +218,8 @@ private fun PreviewWelcomeStep() {
}
}

@Preview(showBackground = true, widthDp = 414, heightDp = 897)
@Preview(showBackground = true, widthDp = 414, heightDp = 897, uiMode = Configuration.UI_MODE_NIGHT_YES)
@Preview(showBackground = true, device = Devices.PIXEL_4_XL)
@Preview(showBackground = true, device = Devices.PIXEL_4_XL, uiMode = Configuration.UI_MODE_NIGHT_YES)
@Composable
private fun PreviewWelcomeStepInProgress() {
val uiState = previewUiState.copy(isProcessing = true)
Expand Down

0 comments on commit 809738d

Please sign in to comment.