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