# OpenOnPhoneDialogContent

## Functions summary

|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialogContent.composable#OpenOnPhoneDialogContent(kotlin.Function1,kotlin.Long,androidx.compose.ui.Modifier,androidx.wear.compose.material3.OpenOnPhoneDialogColors,kotlin.Function0)( curvedText: (https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/CurvedScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?, durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier, colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialogColors, content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` This composable provides the content for an `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialog.composable#OpenOnPhoneDialog(kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.Modifier,androidx.wear.compose.material3.OpenOnPhoneDialogColors,androidx.compose.ui.window.DialogProperties,kotlin.Long,kotlin.Function0)` that displays an animated icon with curved text at the bottom. |

## Functions

### OpenOnPhoneDialogContent

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/OpenOnPhoneDialog.kt+function:OpenOnPhoneDialogContent) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun OpenOnPhoneDialogContent(
    curvedText: (CurvedScope.() -> Unit)?,
    durationMillis: Long,
    modifier: Modifier = Modifier,
    colors: OpenOnPhoneDialogColors = OpenOnPhoneDialogDefaults.colors(),
    content: @Composable () -> Unit
): Unit
```

This composable provides the content for an `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialog.composable#OpenOnPhoneDialog(kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.Modifier,androidx.wear.compose.material3.OpenOnPhoneDialogColors,androidx.compose.ui.window.DialogProperties,kotlin.Long,kotlin.Function0)` that displays an animated icon with curved text at the bottom.

Prefer using `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialog.composable#OpenOnPhoneDialog(kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.Modifier,androidx.wear.compose.material3.OpenOnPhoneDialogColors,androidx.compose.ui.window.DialogProperties,kotlin.Long,kotlin.Function0)` directly, which provides built-in animations when showing/hiding the dialog. This composable may be used to provide the content for an openOnPhone dialog if custom show/hide animations are required.

Example of an `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialog.composable#OpenOnPhoneDialog(kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.Modifier,androidx.wear.compose.material3.OpenOnPhoneDialogColors,androidx.compose.ui.window.DialogProperties,kotlin.Long,kotlin.Function0)` usage:

```kotlin
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.wear.compose.material3.FilledTonalButton
import androidx.wear.compose.material3.OpenOnPhoneDialog
import androidx.wear.compose.material3.OpenOnPhoneDialogDefaults
import androidx.wear.compose.material3.Text
import androidx.wear.compose.material3.openOnPhoneDialogCurvedText

var showConfirmation by remember { mutableStateOf(false) }

Box(Modifier.fillMaxSize()) {
    FilledTonalButton(
        modifier = Modifier.align(Alignment.Center),
        onClick = { showConfirmation = true },
        label = { Text("Open on phone") },
    )
}

val text = OpenOnPhoneDialogDefaults.text
val style = OpenOnPhoneDialogDefaults.curvedTextStyle
OpenOnPhoneDialog(
    visible = showConfirmation,
    onDismissRequest = { showConfirmation = false },
    curvedText = { openOnPhoneDialogCurvedText(text = text, style = style) },
)
```

| Parameters |
|---|---|
| `curvedText: (https://developer.android.com/reference/kotlin/androidx/wear/compose/foundation/CurvedScope.() -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)?` | A slot for displaying curved text content which will be shown along the bottom edge of the dialog. We recommend using `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#(androidx.wear.compose.foundation.CurvedScope).openOnPhoneDialogCurvedText(kotlin.String,androidx.wear.compose.foundation.CurvedTextStyle)` for this parameter, which will give the default sweep angle and padding, and `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialogDefaults#curvedTextStyle()` as the style. |
| `durationMillis: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The duration in milliseconds for which the progress indicator inside of this content is animated. This value should be previously adjusted by the accessibility manager according to the content displayed. See `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialog.composable#OpenOnPhoneDialog(kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.Modifier,androidx.wear.compose.material3.OpenOnPhoneDialogColors,androidx.compose.ui.window.DialogProperties,kotlin.Long,kotlin.Function0)` implementation for more details. |
| `modifier: https://developer.android.com/reference/kotlin/androidx/compose/ui/Modifier = Modifier` | Modifier to be applied to the openOnPhone content. |
| `colors: https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialogColors = OpenOnPhoneDialogDefaults.colors()` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialogColors` that will be used to resolve the colors used for this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialog.composable#OpenOnPhoneDialog(kotlin.Boolean,kotlin.Function0,kotlin.Function1,androidx.compose.ui.Modifier,androidx.wear.compose.material3.OpenOnPhoneDialogColors,androidx.compose.ui.window.DialogProperties,kotlin.Long,kotlin.Function0)`. |
| `content: @https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable () -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | A slot for displaying an icon inside the open on phone dialog, which can be animated. Defaults to `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/OpenOnPhoneDialogDefaults#Icon(androidx.compose.ui.Modifier)`. |