Welcome to the “Detecting Gestures in Compose” Quiz! This quiz is designed to test your knowledge of handling various touch gestures using Jetpack Compose. You’ll encounter questions about gesture detection techniques like tap, long press, drag, scroll, and multi-touch gestures such as pinch and rotation. Whether you’re familiar with gesture modifiers or the more advanced PointerInputScope, this quiz will challenge your understanding and help solidify your knowledge of gesture interactions in Compose.
1.
What is the role of the TransformableState in the transformable() modifier?
2.
What parameter is used with scrollable() to determine the scroll direction?
3.
How can you enable both horizontal and vertical scrolling for a composable?
4.
Which modifier is used to detect drag gestures in a specific direction in Jetpack Compose?
5.
What does the offset change parameter in rememberTransformableState represent?
6.
Which gesture detection method allows tracking both pinch and zoom gestures?
7.
Which modifier is typically used for implementing scrolling behavior in a vertical list?
8.
Which function is used in Jetpack Compose to detect various tap gestures?
9.
How is the scale state applied when using the transformable() modifier?
10.
What is required to handle multi-directional drag gestures in Jetpack Compose?
11.
What is required for detecting translation gestures using the transformable() modifier?
12.
What does the offset parameter in detectDragGestures() represent?
13.
Which gesture detection method allows continuous tracking of touch movements?
14.
Which method is used to create a scroll state in Compose?
15.
Which gesture detection method is not limited to a single orientation?
16.
What function should be used to preserve the state of a gesture across recompositions?
17.
Which property of graphicsLayer would you use to rotate a composable?
18.
Which modifier is used to make a component respond to user scrolling?
19.
Which gesture is commonly used for zooming in or out in a UI?
20.
Which method is used to create a stateful object for detecting gestures like taps and swipes?
21.
How can you simulate multi-touch gestures in an emulator?
22.
What is the purpose of the Modifier.clickable in Jetpack Compose?