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 required for detecting translation gestures using the transformable() modifier?
2.
What function should be used to preserve the state of a gesture across recompositions?
3.
What is the purpose of the Modifier.clickable in Jetpack Compose?
4.
How can you simulate multi-touch gestures in an emulator?
5.
What is required to handle multi-directional drag gestures in Jetpack Compose?
6.
Which function is used in Jetpack Compose to detect various tap gestures?
7.
What does the offset parameter in detectDragGestures() represent?
8.
How can you enable both horizontal and vertical scrolling for a composable?
9.
Which gesture detection method allows continuous tracking of touch movements?
10.
Which method is used to create a scroll state in Compose?
11.
Which gesture is commonly used for zooming in or out in a UI?
12.
What does the offset change parameter in rememberTransformableState represent?
13.
What is the role of the TransformableState in the transformable() modifier?
14.
What parameter is used with scrollable() to determine the scroll direction?
15.
Which modifier is used to detect drag gestures in a specific direction in Jetpack Compose?
16.
How is the scale state applied when using the transformable() modifier?
17.
Which method is used to create a stateful object for detecting gestures like taps and swipes?
18.
Which gesture detection method allows tracking both pinch and zoom gestures?
19.
Which modifier is used to make a component respond to user scrolling?
20.
Which gesture detection method is not limited to a single orientation?
21.
Which modifier is typically used for implementing scrolling behavior in a vertical list?
22.
Which property of graphicsLayer would you use to rotate a composable?