Skip to content

Compose

Willian Mota Oliveira edited this page Aug 23, 2022 · 4 revisions

Using Jetpack Compose

SpinnableView(
    front: @Composable () -> Unit,
    back: @Composable () -> Unit,
    state: SpinnableState = SpinnableState.Manual.Both,
    modifier: Modifier = Modifier
)

Parameters

  • front: Your composable content when the Spinnable is front facing

  • back: Your composable content when the Spinnable is back facing

  • state: Defines in what state is your Spinnable. The following types are available:

None: No movement allowed

Manual: It can be Manual.Horizontal, Manual.Vertical or Manual.Both. Each makes the component spinnable to the according axis.

Automatic: Has the horizontalSpeed and verticalSpeed. It receives a Float value. 360F makes the component spin 360 degrees per second.


This one is also used in jvm target (Desktop)

Clone this wiki locally