CurvedDirection.Angular


value class CurvedDirection.Angular


The direction in which components are laid out on a curvedRow or CurvedLayout

Example:

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.size
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.wear.compose.foundation.CurvedDirection
import androidx.wear.compose.foundation.CurvedLayout
import androidx.wear.compose.foundation.CurvedTextStyle
import androidx.wear.compose.foundation.background
import androidx.wear.compose.foundation.basicCurvedText
import androidx.wear.compose.foundation.curvedComposable
import androidx.wear.compose.foundation.size

CurvedLayout(
    modifier = Modifier.fillMaxSize(),
    anchor = 90f,
    angularDirection = CurvedDirection.Angular.Reversed
) {
    basicCurvedText(
        "Bottom",
        style = {
            CurvedTextStyle(
                fontSize = 16.sp,
                color = Color.Black,
                background = Color.White
            )
        }
    )
    curvedComposable { Spacer(modifier = Modifier.size(5.dp)) }
    basicCurvedText(
        "text",
        style = {
            CurvedTextStyle(
                fontSize = 16.sp,
                color = Color.Black,
                background = Color.White
            )
        }
    )
}

Summary

Public companion properties

CurvedDirection.Angular

Go in Clockwise direction, independently of LayoutDirection.

CurvedDirection.Angular

Go in Counter Clockwise direction, independently of LayoutDirection.

CurvedDirection.Angular

Go in Clockwise direction for Ltr layout and Counter Clockwise for Rtl.

CurvedDirection.Angular

Go in Counter Clockwise direction for Ltr layout and Clockwise for Rtl.

Public companion properties

Clockwise

Added in 1.0.0
val ClockwiseCurvedDirection.Angular

Go in Clockwise direction, independently of LayoutDirection.

CounterClockwise

Added in 1.0.0
val CounterClockwiseCurvedDirection.Angular

Go in Counter Clockwise direction, independently of LayoutDirection.

Normal

Added in 1.0.0
val NormalCurvedDirection.Angular

Go in Clockwise direction for Ltr layout and Counter Clockwise for Rtl. This is generally used for curved layouts on the top of the screen.

Reversed

Added in 1.0.0
val ReversedCurvedDirection.Angular

Go in Counter Clockwise direction for Ltr layout and Clockwise for Rtl. This is generally used for curved layouts on the bottom of the screen.