From 891d8f63b89b77abb3aa05160e5c4924c2a173a0 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Wed, 24 Jan 2024 14:37:03 +0000 Subject: [PATCH 1/4] Demonstrate scrolling dialogs --- .../horologist/screensizes/DialogTest.kt | 63 +++++++++++++++++++ .../horologist/screensizes/ScreenSizeTest.kt | 4 +- ...ongDialogScreen1[0]_mobvoiticwatchpro5.png | 3 + ...gDialogScreen1[0]_mobvoiticwatchpro5_2.png | 3 + ...ngDialogScreen1[1]_samsunggalaxywatch5.png | 3 + ...DialogScreen1[1]_samsunggalaxywatch5_2.png | 3 + ...logScreen1[2]_samsunggalaxywatch6large.png | 3 + ...gScreen1[2]_samsunggalaxywatch6large_2.png | 3 + ..._longDialogScreen1[3]_googlepixelwatch.png | 3 + ...ongDialogScreen1[3]_googlepixelwatch_2.png | 3 + ...longDialogScreen1[4]_genericsmallround.png | 3 + ...ngDialogScreen1[4]_genericsmallround_2.png | 3 + ...longDialogScreen1[5]_genericlargeround.png | 3 + ...ngDialogScreen1[5]_genericlargeround_2.png | 3 + ...ngDialogScreen1[6]_smalldevicebigfonts.png | 3 + ...DialogScreen1[6]_smalldevicebigfonts_2.png | 3 + ...DialogScreen1[7]_largedevicesmallfonts.png | 3 + ...alogScreen1[7]_largedevicesmallfonts_2.png | 3 + 18 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5_2.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5_2.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large_2.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch_2.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround_2.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround_2.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts_2.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts.png create mode 100644 sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts_2.png diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt index 512d7cef20..30f8d85332 100644 --- a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt @@ -16,20 +16,32 @@ package com.google.android.horologist.screensizes +import android.R import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Check import androidx.compose.material.icons.filled.Close import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.style.TextAlign +import androidx.wear.compose.material.MaterialTheme import androidx.wear.compose.material.Text import androidx.wear.compose.material.dialog.Alert +import com.google.android.horologist.compose.layout.ScalingLazyColumnState +import com.google.android.horologist.compose.layout.rememberColumnState import com.google.android.horologist.compose.material.AlertContent import com.google.android.horologist.compose.material.Button +import com.google.android.horologist.compose.material.ResponsiveDialogContent +import com.google.android.horologist.compose.material.ToggleChip +import com.google.android.horologist.compose.material.ToggleChipToggleControl import com.google.android.horologist.compose.tools.Device +import com.google.android.horologist.screenshots.ScreenshotTestRule +import kotlinx.coroutines.runBlocking import org.junit.Test class DialogTest(device: Device) : ScreenSizeTest( device = device, showTimeText = false, + recordMode = ScreenshotTestRule.RecordMode.Record ) { @Composable @@ -70,4 +82,55 @@ class DialogTest(device: Device) : ScreenSizeTest( } } } + + @Test + fun longDialogScreen1() { + lateinit var columnState: ScalingLazyColumnState + + runTest(testFn = { + screenshotTestRule.interact { + runBlocking { + columnState.state.scrollToItem(999, 0) + } + } + + screenshotTestRule.takeScreenshot() + }) { + columnState = rememberColumnState() + + ResponsiveDialogContent( + title = { + Text( + text = "Turn on Bedtime mode?", + color = MaterialTheme.colors.onBackground, + textAlign = TextAlign.Center, + maxLines = 3, + style = MaterialTheme.typography.title3, + ) + }, + onOkButtonClick = {}, + onCancelButtonClick = {}, + okButtonContentDescription = stringResource(R.string.ok), + cancelButtonContentDescription = stringResource(R.string.cancel), + state = columnState, + ) { + item { + Text( + text = "Watch screen, tilt-to-wake, and touch are turned off. " + + "Only calls from starred contacts, repeat callers, " + + "and alarms will notify you.", + textAlign = TextAlign.Left, + ) + } + item { + ToggleChip( + checked = false, + onCheckedChanged = {}, + label = "Don't show again", + toggleControl = ToggleChipToggleControl.Checkbox + ) + } + } + } + } } diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/ScreenSizeTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/ScreenSizeTest.kt index 60657b799c..7eba135067 100644 --- a/sample/src/test/kotlin/com/google/android/horologist/screensizes/ScreenSizeTest.kt +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/ScreenSizeTest.kt @@ -63,7 +63,7 @@ abstract class ScreenSizeTest( runTest { Content() } } - fun runTest(content: @Composable () -> Unit) { + fun runTest(testFn: () -> Unit = {}, content: @Composable () -> Unit) { val shadowDisplay = Shadows.shadowOf(ShadowDisplay.getDefaultDisplay()) shadowDisplay.setDensity(device.density) shadowDisplay.setHeight(device.screenSizePx) @@ -82,6 +82,8 @@ abstract class ScreenSizeTest( content = content, ) } + + testFn() } companion object { diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5.png new file mode 100644 index 0000000000..6f4c462f6e --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e667301e3a13f55f631ebcf44878a63904b82d592fa16b7264891014fbf2b0e2 +size 45867 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5_2.png new file mode 100644 index 0000000000..aaa1aa69c9 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[0]_mobvoiticwatchpro5_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d0ec894bcf66251f0d76c59530547e26d7f984df5d4c33145e2a29cd7c753378 +size 36676 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5.png new file mode 100644 index 0000000000..37c612544e --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31955eb9de24445d77a4ed4d0c34a858021e816e577699b6439717e403c40661 +size 37885 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5_2.png new file mode 100644 index 0000000000..7b25395085 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[1]_samsunggalaxywatch5_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:149d58154688141c1f6e9efce7355d549de6917935dc4bd5fe2efec747102456 +size 29900 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large.png new file mode 100644 index 0000000000..9018541677 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:16494a40f8da3bbbd2f467f2325bef2ba88757cbc68784ec237e56ad36856cf6 +size 47280 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large_2.png new file mode 100644 index 0000000000..8751bf0b52 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[2]_samsunggalaxywatch6large_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb47f191195885b6d10ed4f8c7bee3b01dd371ea959a5a55e61cde0ddf1c1b9c +size 37796 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch.png new file mode 100644 index 0000000000..954401ce7b --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dc3c851fff78ca46b3d9a2481d27e857123d963d172315dd709077be4d9bb68 +size 37899 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch_2.png new file mode 100644 index 0000000000..8f88eb4b64 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[3]_googlepixelwatch_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf81d6120bb949ed0e913f34949ee52cde061c51550756fb8dd975784bb6b816 +size 28665 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround.png new file mode 100644 index 0000000000..954401ce7b --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dc3c851fff78ca46b3d9a2481d27e857123d963d172315dd709077be4d9bb68 +size 37899 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround_2.png new file mode 100644 index 0000000000..8f88eb4b64 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[4]_genericsmallround_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cf81d6120bb949ed0e913f34949ee52cde061c51550756fb8dd975784bb6b816 +size 28665 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround.png new file mode 100644 index 0000000000..76cabeb9fe --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52c3f72a0d30660084c879a75b802d2a13247643b814c9a21905e1ac05b58e96 +size 44492 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround_2.png new file mode 100644 index 0000000000..8a9ecc61f9 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[5]_genericlargeround_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:749f954073efef3ab040e949f93a743497674c91cb22d599cb1ac49d4db2c025 +size 35519 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts.png new file mode 100644 index 0000000000..75b69bd2a1 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:419c50033584a2cb21f7b0295ec2beb0759dc1d208458206deec2772c7b915bd +size 31589 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts_2.png new file mode 100644 index 0000000000..e045477e86 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[6]_smalldevicebigfonts_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f691321327dd17abab12557345fb2613d47d0a42b2d2b634456efa667b6cf3d +size 24820 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts.png new file mode 100644 index 0000000000..940576dbc7 --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36d89f74be48c0fceb2a1e30924440bea3665e6e7dd35d00584f04074d7c59ff +size 45824 diff --git a/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts_2.png b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts_2.png new file mode 100644 index 0000000000..66ec63672e --- /dev/null +++ b/sample/src/test/snapshots/images/com.google.android.horologist.screensizes_DialogTest_longDialogScreen1[7]_largedevicesmallfonts_2.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c8e15b33e57417abd00b4d0bea4ac8e2626268da9de5e49724dfff92c852631 +size 40255 From 449a3c30dca6f5e669e592415bbffac17cc5bee9 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Wed, 24 Jan 2024 14:38:20 +0000 Subject: [PATCH 2/4] Demonstrate scrolling dialogs --- .../com/google/android/horologist/screensizes/DialogTest.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt index 30f8d85332..da5b8afb53 100644 --- a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt @@ -41,7 +41,7 @@ import org.junit.Test class DialogTest(device: Device) : ScreenSizeTest( device = device, showTimeText = false, - recordMode = ScreenshotTestRule.RecordMode.Record + recordMode = ScreenshotTestRule.RecordMode.Record, ) { @Composable @@ -127,7 +127,7 @@ class DialogTest(device: Device) : ScreenSizeTest( checked = false, onCheckedChanged = {}, label = "Don't show again", - toggleControl = ToggleChipToggleControl.Checkbox + toggleControl = ToggleChipToggleControl.Checkbox, ) } } From 772597fb0320198b48cae344042c243cad6a49a1 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Wed, 24 Jan 2024 14:43:00 +0000 Subject: [PATCH 3/4] Demonstrate scrolling dialogs --- .../google/android/horologist/compose/material/AlertDialog.kt | 2 -- .../com/google/android/horologist/screensizes/DialogTest.kt | 2 -- 2 files changed, 4 deletions(-) diff --git a/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt b/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt index 3d91537c83..305ad4e014 100644 --- a/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt +++ b/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt @@ -89,7 +89,6 @@ public fun AlertContent( color = MaterialTheme.colors.onBackground, textAlign = TextAlign.Center, maxLines = 3, - style = MaterialTheme.typography.title3, ) }, onOkButtonClick = onOKButtonClick, @@ -104,7 +103,6 @@ public fun AlertContent( text = body, color = MaterialTheme.colors.onBackground, textAlign = TextAlign.Center, - style = MaterialTheme.typography.body2, ) } } diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt index da5b8afb53..e1ad0d1d53 100644 --- a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt @@ -34,14 +34,12 @@ import com.google.android.horologist.compose.material.ResponsiveDialogContent import com.google.android.horologist.compose.material.ToggleChip import com.google.android.horologist.compose.material.ToggleChipToggleControl import com.google.android.horologist.compose.tools.Device -import com.google.android.horologist.screenshots.ScreenshotTestRule import kotlinx.coroutines.runBlocking import org.junit.Test class DialogTest(device: Device) : ScreenSizeTest( device = device, showTimeText = false, - recordMode = ScreenshotTestRule.RecordMode.Record, ) { @Composable From d57c625e07497a7a69f9f67a47bdf55dbf6e3382 Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Wed, 24 Jan 2024 14:43:57 +0000 Subject: [PATCH 4/4] Demonstrate scrolling dialogs --- .../google/android/horologist/compose/material/AlertDialog.kt | 2 ++ .../com/google/android/horologist/screensizes/DialogTest.kt | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt b/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt index 305ad4e014..3d91537c83 100644 --- a/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt +++ b/compose-material/src/main/java/com/google/android/horologist/compose/material/AlertDialog.kt @@ -89,6 +89,7 @@ public fun AlertContent( color = MaterialTheme.colors.onBackground, textAlign = TextAlign.Center, maxLines = 3, + style = MaterialTheme.typography.title3, ) }, onOkButtonClick = onOKButtonClick, @@ -103,6 +104,7 @@ public fun AlertContent( text = body, color = MaterialTheme.colors.onBackground, textAlign = TextAlign.Center, + style = MaterialTheme.typography.body2, ) } } diff --git a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt index e1ad0d1d53..fbba882fe8 100644 --- a/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt +++ b/sample/src/test/kotlin/com/google/android/horologist/screensizes/DialogTest.kt @@ -103,7 +103,6 @@ class DialogTest(device: Device) : ScreenSizeTest( color = MaterialTheme.colors.onBackground, textAlign = TextAlign.Center, maxLines = 3, - style = MaterialTheme.typography.title3, ) }, onOkButtonClick = {},