로터리 입력은 시계에서 회전하는 부분의 입력을 의미합니다. 평균적으로 사용자가 시계와 상호작용하는 데는 몇 초밖에 걸리지 않습니다. 로터리 입력을 사용하면 사용자가 다양한 작업을 빠르게 완료할 수 있어 사용자 환경을 개선할 수 있습니다.
대부분의 시계에서 로터리 입력의 세 가지 기본 소스에는 회전 측면 버튼(RSB)과 물리적 베젤 또는 터치 베젤(화면 주변의 원형 터치 영역)이 있습니다. 예상되는 동작은 입력 유형에 따라 다를 수 있지만 모든 필수 상호작용에는 로터리 입력을 지원해야 합니다.
스크롤
대부분의 사용자는 앱이 스크롤 동작을 지원할 것으로 기대합니다. 콘텐츠가 화면에서 스크롤될 때 로터리 상호작용에 대한 응답으로 시각적 피드백을 사용자에게 제공합니다.
시각적 피드백에는 세로 스크롤을 위한 스크롤 표시기 또는 페이지 표시기가 포함될 수 있습니다.
ScalingLazyColumn, TransformingLazyColumn, Picker는 기본적으로 스크롤 동작을 지원합니다. 이러한 구성요소를 AppScaffold 및 ScreenScaffold 내부에 배치하고 ScreenScaffold와 구성요소(예: TransformingLazyColumn) 간에 목록 상태를 전달해야 합니다.
AppScaffold 및 ScreenScaffold는 Wear OS 앱의 기본 레이아웃 구조를 제공하며 이미 기본 구현이 있는 스크롤 표시기를 위한 슬롯이 있습니다. 스크롤 진행률을 맞춤설정하려면 다음 코드 스니펫과 같이 목록 상태 객체를 기반으로 스크롤 표시기를 만듭니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-08-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-27(UTC)"],[],[],null,["Compose for Wear OS Material version 2.5 3\n\n*** ** * ** ***\n\nRotary input refers to input from pieces of your watch that spin or rotate. On\naverage, users spend only a few seconds interacting with their watch. You\ncan enhance your user experience by using Rotary input to allow your user to\nquickly accomplish various tasks.\n\nThe three main sources of rotary input on most watches include the rotating side\nbutton (RSB), and either a physical bezel or a touch bezel, which is a circular\ntouch zone around the screen. Though expected behavior may vary based on the\ntype of input, be sure to support rotary input for all essential interactions.\n| **Note:** For View based apps refer to [Rotary input](https://google.github.io/horologist/api/compose-layout/com.google.android.horologist.compose.rotaryinput/rotary-with-scroll.html).\n\nScroll\n\nMost users expect apps to support the scroll gesture. As the content scrolls on\nthe screen, give the users visual feedback in response to rotary interactions.\nVisual feedback can include [scrolling indicators](/reference/kotlin/androidx/wear/compose/material3/package-summary#ScrollIndicator(androidx.compose.foundation.lazy.LazyListState,androidx.compose.ui.Modifier,androidx.wear.compose.material3.ScrollIndicatorColors,kotlin.Boolean,androidx.compose.animation.core.AnimationSpec)) for vertical scroll or\n[page indicators](/reference/kotlin/androidx/wear/compose/material3/package-summary#HorizontalPageIndicator(androidx.wear.compose.foundation.pager.PagerState,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)).\n\n`ScalingLazyColumn`, `TransformingLazyColumn` and `Picker` support the scroll\ngesture by default, as long as you need to place those components inside\n`AppScaffold` and `ScreenScaffold` and pass the list state between `ScreenScaffold`\nand the component, such as a `TransformingLazyColumn`.\n\n`AppScaffold` and `ScreenScaffold` provides the basic layout structure\nfor Wear OS apps and already has a slot for a scroll indicator with a default implementation. To\ncustomize the scrolling progress, create a scroll indicator based on\nthe list state object, as shown in the following code snippet: \n\n```kotlin\nval listState = rememberTransformingLazyColumnState()\nScreenScaffold(\n scrollState = listState,\n scrollIndicator = {\n ScrollIndicator(state = listState)\n }\n) {\n // ...\n}https://github.com/android/snippets/blob/5673ffc60b614daf028ee936227128eb8c4f9781/wear/src/main/java/com/example/wear/snippets/m3/rotary/Rotary.kt#L204-L212\n```\n\nYou can configure a snap behavior for `ScalingLazyColumn` by using\n`ScalingLazyColumnDefaults.snapFlingBehavior`, as shown in the following\ncode snippet: \n\n```kotlin\nval listState = rememberScalingLazyListState()\nScreenScaffold(\n scrollState = listState,\n scrollIndicator = {\n ScrollIndicator(state = listState)\n }\n) {\n\n val state = rememberScalingLazyListState()\n ScalingLazyColumn(\n modifier = Modifier.fillMaxWidth(),\n state = state,\n flingBehavior = ScalingLazyColumnDefaults.snapFlingBehavior(state = state)\n ) {\n // Content goes here\n // ...\n }\n}https://github.com/android/snippets/blob/5673ffc60b614daf028ee936227128eb8c4f9781/wear/src/main/java/com/example/wear/snippets/m3/rotary/Rotary.kt#L171-L197\n```\n\nCustom actions\n\nYou can also create custom actions that respond to rotary input in your app. For\nexample, use rotary input to zoom in and out or to control volume in a media\napp.\n\nIf your component doesn't natively support scrolling events such as volume\ncontrol, you can handle scroll events yourself. \n\n // VolumeScreen.kt\n\n val focusRequester: FocusRequester = remember { FocusRequester() }\n\n Column(\n modifier = Modifier\n .fillMaxSize()\n .onRotaryScrollEvent {\n // handle rotary scroll events\n true\n }\n .focusRequester(focusRequester)\n .focusable(),\n ) { ... }\n\nCreate a custom state managed in view model, and a custom callback that is used\nto process rotary scroll events. \n\n // VolumeViewModel.kt\n\n object VolumeRange(\n public val max: Int = 10\n public val min: Int = 0\n )\n\n val volumeState: MutableStateFlow\u003cInt\u003e = ...\n\n fun onVolumeChangeByScroll(pixels: Float) {\n volumeState.value = when {\n pixels \u003e 0 -\u003e min (volumeState.value + 1, VolumeRange.max)\n pixels \u003c 0 -\u003e max (volumeState.value - 1, VolumeRange.min)\n }\n }\n\nFor the sake of simplicity, the preceding example uses pixel values that, if\nactually used are likely to be overly sensitive.\n\nUse the callback once you receive the events, as shown in the following snippet. \n\n val focusRequester: FocusRequester = remember { FocusRequester() }\n val volumeState by volumeViewModel.volumeState.collectAsState()\n\n Column(\n modifier = Modifier\n .fillMaxSize()\n .onRotaryScrollEvent {\n volumeViewModel\n .onVolumeChangeByScroll(it.verticalScrollPixels)\n true\n }\n .focusRequester(focusRequester)\n .focusable(),\n ) { ... }\n\nRecommended for you\n\n- Note: link text is displayed when JavaScript is off\n- [Change focus behavior](/develop/ui/compose/touch-input/focus/change-focus-behavior)\n- [Add keyboard, mouse, trackpad, and stylus support with Jetpack Compose](/codelabs/large-screens/add-keyboard-and-mouse-support-with-compose)\n- [Compose for Wear OS Codelab](/codelabs/compose-for-wear-os)"]]