Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add screenshots for Wear Material Dialog #2001

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,58 @@

package com.google.android.horologist.screensizes

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.wear.compose.material.Text
import androidx.wear.compose.material.dialog.Alert
import com.google.android.horologist.compose.material.AlertContent
import com.google.android.horologist.compose.material.Button
import com.google.android.horologist.compose.tools.Device
import org.junit.Test

class DialogTest(device: Device) : ScreenSizeTest(device = device, showTimeText = false) {
class DialogTest(device: Device) : ScreenSizeTest(
device = device,
showTimeText = false,
) {

@Composable
override fun Content() {
// horologist AlertContent using ResponsiveDialogContent
AlertContent(
title = "Phone app is required",
onCancelButtonClick = {},
onOKButtonClick = {},
body = "Tap the button below to install it on your phone.",
)
}

@Test
fun wearMaterial() {
// androidx.wear.compose.material.dialog.Alert with no formatting
runTest {
Alert(
title = { Text("Phone app is required") },
negativeButton = {
Button(
imageVector = Icons.Default.Close,
contentDescription = "",
onClick = {},
)
},
positiveButton = {
Button(
imageVector = Icons.Default.Check,
contentDescription = "",
onClick = { },
)
},
) {
Text(
text = "Tap the button below to install it on your phone.",
)
}
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.