![]() If your UI contains some other view that takes focus when the user interacts with it (for example,Īn InputText), provide the user with some way to restore focus to the scrollable view.Nested scrolling is not supported with the rotating side button. If your activity contains multiple scrollable views, choose one to focus via the.If your scrollable view is initially INVISIBLE.(for example, waiting for a network request to finish before building your UI), call If your scrollable view is attached after Activity.onCreate().If there is no focused view, or if the focused view returns false from Rotary input events are sent only to the focused view.Mark custom scrollable views as focusable using both android:focusable="true". ![]() Tag or manually call View.requestFocus(). To give your view focus, the view must use the By default, launching an activity or even tapping on a view does not give it focus, even if it isįocusable.Practices around responding to rotary input events: To respond to rotary input events, a scrollable container must have focus. Having focus is an important prerequisite, because on Android 9 (API level 28) and higher, views don't Support rotary input without requiring any Wear OS-specific code, if these containers have focus. When the user turns theīutton, your app's current view should scroll up or down. Some Wear OS devices contain a physical rotating side button. ![]()
0 Comments
Leave a Reply. |