Jetpack Compose Interview Questions Guide
Jetpack Compose Interview Questions Guide
oi
100 Most-Asked Jetpack Compose
n dr
Interview Questions (Deep-Drive
-a
nu
Answers)
ha
ris
/k
1. What is Jetpack Compose? Explain its
/in
changes.
di
ke
lin
① Declarative UI Model
ht
@Composable
fun Greeting(name: String) {
Text("Hello $name")
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
}
oi
dr
Whenever name changes → Compose recomposes only this part.
n
-a
nu
② Composition
ha
Composition = Tree of UI nodes created from Composable functions.
Column {
ris
/k
Text("Title")
/in
Button(onClick = {}) { Text("Click") }
}
m
co
This tree helps Compose know which UI elements depend on which state.
n.
di
ke
Recomposition only redraws the part whose state changed, not the entire screen.
n.
Flow:
//i
❗
Interview hint:
Recomposition is incremental, targeted, and super lightweight.
ht
Compose is state-driven.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
var count by remember { mutableStateOf(0) }
oi
dr
UI automatically updates when count changes.
n
-a
Best practice: Move state upwards (state hoisting) to avoid duplicates and maintain UDF.
nu
ha
⑤ Compose Compiler + Runtime
ris
● Compose Compiler Plugin: Converts @Composable into optimized code.
/k
/in
● Compose Runtime: Manages slot table, recomposition, state reads, and skips.
m
co
n.
Lifecycle in Compose
di
Concept Purpose
lin
composition
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
✔ No XML inflation
oi
✔ Updates only changed UI
✔ Compiler optimization
dr
✔ Kotlin-first design
n
-a
nu
Use Cases
ha
● Dynamic screens
● Forms
ris
/k
/in
● Material 3 UI
m
● Animation-heavy screens
co
● Lazy lists
n.
di
ke
Example Implementation
lin
@Composable
n.
fun CounterScreen() {
//i
Column(
tp
horizontalAlignment = [Link],
verticalArrangement = [Link],
ht
) {
Text("Count: $count", fontSize = [Link])
Button(onClick = { count++ }) {
Text("Increase")
}
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
}
oi
}
n dr
-a
Short Summary (Interview)
nu
Jetpack Compose is a declarative UI toolkit that rebuilds UI on state changes using
ha
composition, recomposition, compiler optimizations, and unidirectional data flow. It eliminates
XML, improves productivity, and delivers highly efficient UI rendering.
ris
/k
/in
work internally?
n.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
Rules of @Composable
n dr
● Should be side-effect free
-a
nu
● Can only be called from other Composables
ha
● Must be fast & deterministic
ris
● Should not perform long operations
/k
/in
m
Composition Example
co
@Composable
fun UserCard(name: String) {
n.
Text("User: $name")
di
}
ke
lin
Why Important?
tp
Short Summary
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
A Composable defines UI using Kotlin functions. The Compose compiler rewrites them to
oi
manage composition, state tracking, and efficient rendering.
n dr
-a
3. Explain Recomposition in Jetpack
nu
Compose with internal working.
ha
ris
Recomposition is the process where Compose re-executes specific Composables when state
/k
they read changes.
/in
m
Important Points
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Very efficient memory-wise
oi
● Happens asynchronously
n dr
-a
nu
Example
ha
var name by remember { mutableStateOf("John") }
ris
Text("Hello $name") /k
/in
Short Summary
di
Recomposition is targeted UI update triggered by state changes, using slot table & snapshot
ke
system.
lin
n.
//i
it?
tp
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
How It Works
oi
● Stores value in Composition slot table
n dr
● Reused during recomposition
-a
nu
● Lost when Composable leaves composition
ha
Use Cases
ris
/k
/in
● UI local state
m
● Animation state
co
● Flag states
n.
di
ke
Short Summary
lin
n.
remember stores state across recompositions but not across configuration changes.
//i
s:
tp
5. remember vs rememberSaveable
ht
Survives recomposition ✔ ✔
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Survives rotation ✘ ✔
oi
dr
Stored in Slot table Bundle/SavedState
n
-a
Example
nu
val name = rememberSaveable { mutableStateOf("") }
ha
ris
Best for forms & inputs.
/k
/in
m
Why?
lin
Pattern
Old:
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Child manages state → not reusable
oi
dr
Hoisted:
n
-a
@Composable
nu
fun Parent() {
var text by remember { mutableStateOf("") }
ha
Child(text) { text = it }
}
ris
/k
/in
● Composition tree
lin
● State references
n.
//i
● Remembered values
s:
● Keys
tp
ht
● Layout nodes
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
✔ What changed
oi
✔ What to skip
✔ What to reuse
n dr
-a
Short Summary
nu
ha
Slot table = Compose’s internal database for UI rendering.
ris
/k
8. Explain Unidirectional Data Flow (UDF)
/in
m
in Compose
co
UDF =
n.
Why Important?
n.
//i
● Highly predictable
s:
● Debug-friendly
tp
ht
Structure
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
state → UI → event → ViewModel → new state → UI
oi
n dr
-a
9. What is a Modifier? Explain its
nu
architecture.
ha
ris
Modifiers decorate or enhance UI behavior.
/k
/in
Modifier
n.
.padding([Link])
di
.background([Link])
ke
.clickable { }
lin
n.
Internally:
//i
Types
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Layout
oi
● Draw
n dr
● Gesture
-a
nu
● Animation
ha
● Semantics
ris
/k
/in
✔ LaunchedEffect
//i
✔ DisposableEffect
ht
✔ SideEffect
✔ rememberCoroutineScope
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Launch externally controlled coroutines.
oi
✔ produceState
n dr
Convert async data → State.
-a
nu
Short Summary
ha
Side effects allow safe execution of external tasks like coroutines, observers, listeners.
ris
/k
/in
It guarantees:
n.
oi
● CoroutineScope tied to the Composable
n dr
● Snapshot state observation
-a
nu
Flow:
ha
1. When Composable enters composition → LaunchedEffect launches a coroutine
Use Cases
ke
lin
✔ Listening to Flows/StateFlow
s:
tp
ht
Example
@Composable
fun UserScreen(viewModel: UserViewModel) {
LaunchedEffect(Unit) {
[Link]()
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
}
oi
}
n dr
This ensures data loads only once when screen renders.
-a
nu
ha
Short Summary
ris
LaunchedEffect runs suspend tasks safely within a Composable lifecycle, automatically
/k
canceling when the UI changes.
/in
m
co
● onDispose { … }
● Composition lifecycle
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Snapshot observer teardown
oi
n dr
-a
Flow:
nu
1. When key enters → setup block runs
ha
2. When key changes or Composable removed → onDispose executes
Use Cases
n.
✔ Registering/unregistering BroadcastReceivers
di
✔ Adding/removing listeners
ke
✔ Sensor callbacks
✔ Location providers
lin
Example
ht
DisposableEffect(Unit) {
val receiver = registerReceiver()
onDispose {
unregisterReceiver(receiver)
}
}
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
Short Summary
n
-a
DisposableEffect is used for setup + cleanup around external resources tied to lifecycle.
nu
ha
13. Explain produceState in Jetpack
ris
/k
Compose.
/in
m
How It Works
ke
lin
● Survives recomposition
ht
● Cancels on removal
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Use Cases
oi
dr
✔ Convert Flow to State
✔ Convert callbacks to State
n
✔ API calls returning multiple updates
-a
✔ Realtime updates (socket, sensors)
nu
ha
Example
@Composable
ris
/k
fun UserData(userId: String): State<User> {
/in
value = [Link](userId)
co
}
}
n.
di
ke
Short Summary
lin
n.
important?
derivedStateOf optimizes expensive UI calculations by memoizing results.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
How It Works
n
-a
● Tracks dependencies
nu
● Recomputes only when dependency changes
ha
● Prevents useless recompositions
}
ke
lin
Why Important?
tp
ht
✔ Improves performance
✔ Reduces recompositions
✔ Avoids heavy calculations running repeatedly
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Short Summary
oi
dr
derivedStateOf creates optimized, memoized state for expensive calculations inside
n
Compose.
-a
nu
15. Explain Snapshot System in Jetpack
ha
Compose.
ris
/k
The Snapshot system is Compose’s reactive state management engine.
/in
m
co
How It Works
n.
● Initiates recomposition
//i
s:
tp
Key Principles:
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
Use Cases
n
-a
✔ Compose state (mutableStateOf)
✔ remember
nu
✔ State in ViewModel
ha
✔ Animation states
ris
/k
Short Summary
/in
Snapshot system is the engine behind Compose's reactive UI updates, detecting state changes
m
internal working.
lin
n.
How It Works
● Injects values without passing them through every parameter
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Uses snapshot reads for updates
oi
● Recomposition triggers where value is used
n dr
-a
nu
Use Cases
ha
✔ Current Theme
ris
✔ Current App Locale /k
✔ Current User
✔ Window Insets
/in
✔ Spacing / Dimensions
m
co
n.
Example
di
}
//i
s:
tp
Short Summary
ht
CompositionLocal allows passing data implicitly down the UI tree without prop-drilling.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
17. Explain Modifier internals in Jetpack
oi
dr
Compose.
n
-a
A Modifier is a declarative way to modify:
nu
● layout
ha
● drawing
● gesture
ris
/k
/in
● semantics
m
co
n.
[Link]() → LayoutNode
[Link]() → DrawNode
n.
[Link]() → InteractionNode
//i
s:
1. Layout
2. Draw
3. Input
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
4. Semantics
oi
n dr
-a
Why Important?
nu
✔ Predictable behavior
ha
✔ Easy customization
✔ Extensible UI pipeline
ris
/k
/in
Short Summary
m
co
Modifier is a chain of behavior nodes that affect layout, drawing, and interaction in Compose.
n.
di
ke
do we need them?
n.
//i
Why Needed?
Without keys:
● Scroll jumps
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Wrong item reused
oi
● Incorrect animations
n dr
● State misplaced
-a
nu
ha
Example
items(users, key = { [Link] }) {
ris
/k
UserRow(it)
/in
}
m
co
n.
Internal Behavior
di
Short Summary
Keys stabilize list items to prevent UI inconsistencies during recomposition or data updates.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
19. What is rememberCoroutineScope?
oi
dr
How is it different from LaunchedEffect?
n
-a
rememberCoroutineScope
nu
Creates a coroutine scope manual control inside Composables.
ha
LaunchedEffect
Difference Table
co
animations
s:
tp
ht
Example
val scope = rememberCoroutineScope()
Button(onClick = {
[Link] { [Link]("Hello") }
}) {
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Text("Show Snackbar")
oi
}
n dr
-a
Short Summary
nu
ha
rememberCoroutineScope gives a lifecycle-aware coroutine scope for manual launches, unlike
automatic LaunchedEffect.
ris
/k
/in
● Physics-based animations
ke
● Tween animations
lin
n.
● Keyframes
//i
● Infinite transitions
s:
tp
ht
Core Concepts
① animate*AsState
oi
Group multiple animations.
n dr
③ Animatable
-a
nu
Low-level controllable animations.
ha
④ InfiniteTransition
ris
Loops forever.
/k
⑤ AnimationSpec
/in
Internal Architecture
di
ke
Example
val alpha by animateFloatAsState(
targetValue = if (visible) 1f else 0f
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
)
oi
n dr
Short Summary
-a
nu
Animations in Compose are based on observable state changes and render with
ha
frame-by-frame recompositions.
ris
/k
21. What is Recomposition in Jetpack Compose? How
/in
Recomposition = the process where Compose re-executes only those @Composable functions
whose inputs (state) have changed.
n.
Compose tracks:
lin
Key Points
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Recomposition is incremental, not a full redraw.
oi
● Compose uses a SlotTable to track UI structure & efficiently update nodes.
n dr
● Only functions reading changed state re-run.
-a
nu
● Order matters. If Composable function order changes → new composition tree.
ha
Example
ris
var name by remember { mutableStateOf("John") } /k
/in
Text("Hello $name")
m
Interview Tip:
Recomposition is not triggered when you call a composable—it’s triggered when
di
state changes.
ke
lin
n.
● Composition tree
ht
● State "slots"
● Remembered values
● Node relationships
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Think of it as Compose’s virtual DOM.
oi
Responsibilities
n dr
● Tracks what was composed last time
-a
nu
● Decides what needs updating
ha
● Avoids recreating UI elements unnecessarily
ris
● Optimizes diffing
/k
/in
Why Important?
m
Interview Tip:
n.
Key Properties
tp
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
○ configuration change
oi
○ process death
n dr
-a
Example:
nu
val count = remember { mutableStateOf(0) }
ha
ris
Internals
/k
● Stored in composition slots
/in
❌ ✅
s:
change
❌
ht
Example:
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
rememberSaveable { mutableStateOf(0) }
oi
dr
Use rememberSaveable for:
n
-a
● Input fields
nu
● Counters
ha
● UI selections
● Navigation state
ris
/k
/in
m
co
Example
SideEffect {
lin
println("Recomposed")
n.
}
//i
s:
Use Cases
tp
ht
● Logging recompositions
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Important
oi
● Runs on main thread
n dr
● Runs every recomposition, so use carefully
-a
nu
ha
26. What is DisposableEffect? How does cleanup work?
ris
/k
DisposableEffect is used to run side-effects tied to the lifecycle of a composable.
/in
Example:
m
DisposableEffect(Unit) {
co
startLocationUpdates()
n.
onDispose {
di
stopLocationUpdates()
ke
}
lin
}
n.
//i
Triggered When:
s:
● Keys change
tp
ht
Use Cases
● Location listener
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Broadcast receivers
oi
● Lifecycle observers
n dr
● Sensors
-a
nu
● Callbacks cleanup
ha
27. What is LaunchedEffect? Why is it needed? ris
/k
/in
Example:
co
LaunchedEffect(Unit) {
n.
loadUserData()
di
}
ke
lin
Features
n.
● Useful for:
ht
○ API calls
○ Animations
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
○ One-time tasks
oi
dr
Internally uses rememberCoroutineScope() + Composition lifecycle.
n
-a
nu
28. What is the difference between DerivedStateOf and
ha
SnapshotState?
ris
Feature SnapshotState
/k DerivedStateOf
Example:
lin
● Optimize recomposition
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
29. What is rememberUpdatedState?
oi
dr
Used to capture the latest value inside side effects like LaunchedEffect.
n
Problem:
-a
LaunchedEffect captures old values due to coroutine scope.
nu
Solution:
ha
val latestCallback by rememberUpdatedState(onClick)
ris
/k
Fixes stale lambda issues.
/in
m
co
function?
di
Example:
//i
s:
key([Link]) {
tp
UserRow(user)
}
ht
Required When:
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Items insert/delete
oi
● Animation-based UI
n dr
● LazyColumn dynamic data
-a
nu
How it works internally
ha
● Compose stores key → slot mapping
CompositionLocal is a way to pass data down the composition tree without explicitly
n.
Example
tp
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Inside ProfileScreen():
oi
val user = [Link]
n dr
-a
Use Cases
nu
● Themes (colors, typography)
ha
● Locale settings
● User preferences
ris
/k
/in
● Window size, screen configs
m
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
32. What is the difference between
oi
dr
compositionLocalOf and
n
staticCompositionLocalOf?
-a
nu
Feature compositionLocalO staticCompositionLocalO
ha
f f
ris
Recomposition triggered Yes Usually no
❌ ✔️
co
Better performance?
n.
Example
di
ke
● User session
n.
● Theme modes
//i
s:
● Colors
● Typography
● Fixed config
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Why?
oi
staticCompositionLocalOf allows Compose to skip more recompositions → better
dr
performance.
n
-a
nu
33. What is Snapshot System in Jetpack
ha
ris
Compose? /k
/in
Compose uses a Snapshot system to track mutable state changes.
m
Key Concepts
co
Snapshot Responsibilities
s:
tp
● Schedule recompositions
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Why it matters?
oi
Compose updates UI predictably even when multiple states update in parallel.
n dr
-a
nu
34. Explain Stability in Jetpack Compose.
ha
Why “stable” objects matter?
ris
/k
Compose uses stability to decide whether a Composable needs recomposition.
/in
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Example:
oi
@Immutable
dr
data class User(val name: String, val age: Int)
n
-a
nu
Interview Tip
ha
Understanding stability shows deep Compose performance knowledge.
ris
/k
/in
35. What is the difference between
m
❌ ✔️
ke
stable?
n.
Example Use
tp
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
36. How do animations work internally in
oi
dr
Jetpack Compose?
n
-a
Compose animations are state-driven:
nu
1. You change animation state
ha
2. Compose runs animation clock
Types of Animations
n.
Example
tp
ht
Engine
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Compose uses:
oi
● Choreographer (Android)
n dr
● Coroutines
-a
● Frame clock
nu
ha
● Physics-based animations (spring, decay)
ris
/k
/in
Example:
lin
}
//i
s:
Why required?
tp
ht
Without keys:
● UI flickers
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Animation bugs
oi
● Wrong states restored inside rows
n dr
● Scrolling may break
-a
nu
Internally
ha
● Compose maps key → slot
ris
● Reuses or removes nodes during recomposition based on key matching
/k
/in
m
co
internally?
di
ke
Compositional Steps:
n.
//i
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
6. Offscreen items are disposed automatically
oi
dr
Benefits
n
-a
● Efficient memory usage
nu
● Smooth scrolling
ha
● State preservation inside each row
ris
/k
/in
m
background?
di
ke
[Link]
lin
n.
Example:
Text("Hello", [Link]([Link]))
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Box with background
oi
Box([Link]().background([Link])) {
dr
Text("Hello")
n
}
-a
nu
● Box creates a layout node
ha
● Can contain multiple children
Interview Tip
m
The Compose Compiler Plugin transforms @Composable functions into optimized code.
s:
Responsibilities:
tp
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Inserts recomposition logic
oi
● Eliminates unused parameters
n dr
● Rewrites lambdas
-a
nu
● Performs stability inference
ha
Why Needed?
Example:
A simple Text("Hi") is transformed into hundreds of lines of optimized machine-level
di
operations.
ke
lin
n.
//i
used?
ht
derivedStateOf creates a memoized value that recalculates only when its dependencies
change.
Why We Need It
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Compose recomposes UI based on state changes.
oi
But sometimes you derive another value from a state:
dr
val isValid = [Link]() && age > 0
n
-a
This may cause unnecessary recompositions.
nu
ha
Solution
ris
Use derivedStateOf:
/k
val isValid by derivedStateOf {
/in
[Link]() && age > 0
}
m
co
Benefits
n.
di
● Reduces recomposition
ke
● Optimizes performance
lin
Use Cases
tp
● Filtering lists
ht
● Validation
● Derived UI states
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
42. What is snapshotFlow? Explain with a
oi
dr
deep example.
n
-a
snapshotFlow converts Compose state into a Kotlin Flow.
nu
Example:
ha
val scrollState = rememberLazyListState()
LaunchedEffect(Unit) {
ris
/k
snapshotFlow { [Link] }
/in
}
}
n.
di
● Efficient + lifecycle-aware
s:
tp
ht
Internally
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Batch updates to avoid rapid unnecessary emissions
oi
n dr
-a
43. Explain the difference between
nu
remember vs rememberSaveable.
ha
Feature remember
ris rememberSaveable
/k
Survives recomposition ✔️ ✔️
/in
❌ ✔️
m
saver)
di
memory
lin
Example:
n.
Use Cases
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Form fields
oi
● Temporary screen data
n dr
-a
nu
44. What is LaunchedEffect? How does
ha
ris
it handle lifecycle? /k
/in
LaunchedEffect runs suspend functions inside a composable when a key changes.
m
Example
co
LaunchedEffect(userId) {
n.
[Link](userId)
}
di
ke
Lifecycle Rules
lin
n.
Internally:
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Cancels using structured concurrency
oi
dr
Use Cases
n
-a
● API calls
nu
● Animations
ha
● State initialization
ris
/k
/in
m
Example:
SideEffect {
n.
[Link]("Home")
//i
}
s:
tp
Purpose
ht
● Logging
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Firebase
oi
● Analytics
n dr
● Updating external variables
-a
nu
Internally
ha
Runs after UI is applied → ensures state is stable.
Interview Tip
ris
/k
/in
Use SideEffect only for tiny operations.
For long-running tasks → use LaunchedEffect.
m
co
n.
a real-life scenario.
lin
n.
Example:
s:
tp
DisposableEffect(Unit) {
[Link]()
ht
onDispose {
[Link]()
}
}
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
Use Cases
n dr
● Observers
-a
nu
● Listeners
ha
● Broadcast receivers
ris
● Sensor APIs
/k
/in
Internally
m
● Cleans up automatically
n.
di
ke
lin
Compose?
//i
s:
tp
SlotTable is the main data structure that stores the Composition tree.
ht
Responsibilities
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Maintains remember values
oi
● Optimizes recomposition
n dr
-a
Internal Working
nu
When a composable runs:
ha
● SlotTable allocates "slots"
Compose.
n.
//i
Responsibilities
tp
ht
● Schedules recomposition
● Manages frames
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Coordinates UI updates
oi
● Ensures thread safety
n dr
-a
Life Cycle
nu
1. State changes
ha
2. Composer notifies Recomposer
Interview Tip
n.
use slots?
//i
s:
tp
Slots store:
● Remembered values
● Keys
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Params
oi
● Skips flags
n dr
● UI node references
-a
nu
Why Slots?
ha
To:
● Skip recompositions
ris
/k
/in
● Track which Composable produced which UI subtree
m
“Skipping” vs “Recomposing” in
//i
s:
Compose.
tp
ht
Recomposing
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Happens when state changes
oi
dr
Skipping
n
-a
● Compose reuses previously generated UI
nu
● Happens when params are stable
ha
● Zero recomposition cost → fast
ris
/k
Example:
/in
@Composable
m
Key Mechanism
ke
lin
● Stability inference
//i
● SlotTable state
s:
tp
● Keys
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
51. Explain “Recomposition Scope” in
oi
dr
Jetpack Compose.
n
-a
A recomposition scope defines the region of UI that will recompose when a state read inside
nu
that scope changes.
ha
How It Works
ris
If a Composable reads a state:
/k
@Composable
/in
fun Counter() {
val count by remember { mutableStateOf(0) }
m
Text("Count: $count")
co
}
n.
di
Important Points
lin
n.
Why It Matters
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
52. What causes unnecessary
n
-a
recompositions? How to avoid them?
nu
ha
Causes
ris
1. Passing non-stable objects
/k
2. Creating objects inside Composables
/in
Avoid with:
n.
//i
✔ Hoist state
✔ Avoid creating new lists/maps in Composable
ht
Example BAD:
@Composable
fun Screen() {
val list = listOf(1, 2, 3) // new instance every recomposition
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
}
oi
dr
FIX:
n
-a
@Composable
nu
fun Screen() {
val list = remember { listOf(1, 2, 3) }
ha
}
ris
/k
/in
Why is it important?
co
n.
delay(1000)
n.
}
s:
tp
Solution
ht
LaunchedEffect(Unit) {
delay(1000)
updatedOnClick() // always latest
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
}
oi
dr
Use Cases
n
-a
● Callbacks
nu
● Lambdas
ha
● Listeners inside effects
ris
/k
Why Important?
/in
works internally.
lin
n.
Compose checks:
//i
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Internally
oi
Each composable call stores:
n dr
● Parameter hash
-a
● Stability metadata
nu
ha
● Remembered values
ris
During next recomposition: /k
● Compare with previous slot values
/in
m
Result
di
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Controlled by Composer, SlotTable LayoutNode & MeasurePolicy
oi
dr
Output Composition tree Pixel positions
n
Simple explanation:
-a
nu
Composition → “What UI to show?”
Layout → “Where to place it on screen?”
ha
ris
/k
56. How does Modifier chain work
/in
m
internally?
co
Example:
ht
Modifier
.padding([Link])
.background([Link])
.clickable { }
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Internally:
oi
● Top → bottom: layout & drawing
n dr
● Bottom → top: event handling
-a
nu
Why Important?
ha
Modifier order affects:
ris
● Layout /k
/in
● Drawing
m
● Event priority
co
n.
di
ke
Compose.
n.
//i
Layout order:
s:
Draw order:
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Example:
oi
Box {
dr
Text("A")
n
Text("B")
-a
}
nu
ha
Draws: A → B
(B appears on top)
ris
/k
/in
Types:
di
ke
● clickable
lin
● pointerInput
n.
//i
● detectTapGestures
s:
tp
● scrollable
ht
● draggable
Example:
[Link](Unit) {
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
detectTapGestures(
oi
onTap = { println("Tapped!") }
dr
)
}
n
-a
nu
Internally
ha
1. Pointer events are intercepted
ris
2. Event passes through modifier layers /k
3. First handler to consume → stops propagation
/in
m
co
n.
Use Case
s:
tp
● Collapsing toolbars
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Example
oi
Used in:
n dr
● ConstraintLayout
-a
nu
● Scaffold
ha
● LazyColumn
ris
/k
Why Important?
/in
Compose UI rendering.
lin
n.
Phase 1 — Composition
//i
s:
● Executes Composables
tp
● Creates UI tree
Phase 2 — Layout
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Measures size
oi
● Assigns positions
n dr
-a
Phase 3 — Drawing
nu
● Render pixels onto canvas
ha
● Includes backgrounds, shapes, modifiers
ris
/k
Why Important?
/in
● Expensive layouts
n.
● Custom drawing
di
changes.
MutableState<T> is an observable state holder that notifies Compose when its value
changes.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Example
oi
var count by mutableStateOf(0)
n dr
-a
How Compose Tracks Changes
nu
Each MutableState stores:
ha
● A value
ris
● A snapshot record /k
● A list of observers (Recomposer)
/in
m
count++
n.
di
ke
Compose:
lin
Why Important?
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
62. Difference Between StateFlow,
oi
dr
LiveData, and MutableState in
n
-a
Compose.
nu
Feature MutableState StateFlow LiveData
ha
Best for UI state Streams + business Legacy
ris
logic /k apps
● Inside UI → MutableState
//i
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
63. Explain produceState with an
oi
dr
example.
n
-a
produceState converts non-UI async operations into Compose state.
nu
Example — Load API Data
ha
@Composable
ris
fun UserScreen(id: Int) {
val user by produceState<User?>(initialValue = null, id) {
/k
value = [Link](id)
/in
}
m
co
Text(user?.name ?: "Loading…")
}
n.
di
Why Useful?
ke
lin
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
64. What is
oi
dr
rememberCoroutineScope()? How is it
n
-a
different from LaunchedEffect?
nu
ha
rememberCoroutineScope()
ris
Creates a CoroutineScope tied to the composable’s lifecycle.
/k
Example:
/in
Button(onClick = {
[Link] { /* long task */ }
n.
}) {
di
Text("Start")
ke
}
lin
n.
Difference vs LaunchedEffect
//i
❌ ✔️
tp
Runs immediately?
ht
Controlled manually? ✔️ ❌
Good for user ✔️ ❌
actions
Krishanu Nandan
Senior Android Developer
Follow - [Link]
❌ ✔️
d
Good for initial tasks
oi
n dr
-a
65. What is NestedScrollConnection
nu
and when is it used?
ha
ris
Allows two scrollable components to coordinate scroll behavior.
/k
Example Use Cases
/in
● Collapsing toolbar
m
co
● AppBar + List
di
● Custom gestures
ke
lin
Example Concept
n.
Or vice versa.
s:
tp
● Scaffold
● TopAppBar
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
66. How do keys affect LazyColumn
n
-a
recomposition and state restoration?
nu
ha
Without keys:
ris
Rows get reused randomly
→ Wrong state inside reused composable
/k
/in
With keys:
m
→ Stable UI
→ Correct state
n.
di
Example:
ke
}
n.
//i
Internally
s:
tp
If a row leaves and re-enters viewport → key allows restoring correct remembered values.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
67. What is View Composition
oi
dr
Strategy? (Important for Android XML +
n
-a
Compose)
nu
When using Compose inside a View (ComposeView), you must choose how/when to dispose
ha
the composition.
Strategies:
ris
/k
/in
1. DisposeOnDetachedFromWindow
m
3. DisposeOnViewTreeLifecycleDestroyed
n.
di
Example:
ke
[Link](
lin
[Link](lifecycle)
)
n.
//i
s:
Why Important?
tp
Avoids:
ht
● Memory leaks
● Stale compositions
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Crashes
oi
n dr
-a
68. Explain interoperability: Using Views
nu
inside Compose.
ha
ris
Use AndroidView. /k
/in
Example:
AndroidView(
m
TextView(context).apply {
n.
},
ke
[Link] = "Updated!"
}
n.
)
//i
s:
tp
Use Cases:
ht
● Maps
● Ads
● WebView
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Legacy UI
oi
dr
Internally
n
-a
Compose measures & lays out the view like a normal composable.
nu
ha
69. Explain interoperability: Using
ris
/k
Compose inside XML.
/in
m
Use ComposeView.
co
XML:
n.
<[Link]
di
android:id="@+id/composeView"
ke
android:layout_width="match_parent"
android:layout_height="wrap_content" />
lin
n.
Activity:
//i
[Link] {
s:
Text("Hello Compose")
tp
}
ht
Challenges:
● Lifecycles mismatch
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Configuration changes
oi
● Recomposition control
n dr
-a
nu
70. How do you handle performance
ha
ris
optimization in Jetpack Compose? /k
/in
Key Techniques
m
✔ Hoist state
n.
✔ Use derivedStateOf
s:
tp
Prevents UI lag.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Wrap them with remember.
oi
✔ Use lazy layouts
n dr
Render only visible items.
-a
✔ Optimize Modifier order
nu
Place layout-affecting modifiers first:
ha
● size
● padding
ris
/k
/in
● background
m
co
Definition
ht
CompositionLocal is a way to share data implicitly across the Compose tree without passing
it through every Composable parameter.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
How It Works Internally
n dr
● Compose stores CompositionLocal values in its slot table.
-a
nu
● When you call CompositionLocalProvider, you override the value for that subtree.
ha
● When a Composable reads a local, Compose tracks that read.
ris
● If the local value changes → only the consumers that read that local recompose.
/k
/in
m
Example
co
@Composable
di
fun App() {
ke
HomeScreen()
}
n.
}
//i
s:
@Composable
tp
fun HomeScreen() {
ht
Text("Welcome: ${[Link]}")
}
Best Practices
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
✔ Use for theme-like or global data.
oi
✔ Don’t overuse—may hide dependencies.
n dr
-a
72. What is rememberSaveable? How does
nu
it work under the hood?
ha
Definition
ris
/k
/in
rememberSaveable stores state during:
m
● recomposition ✔
co
● configuration change ✔
n.
How it works
n.
//i
Example
var name by rememberSaveable { mutableStateOf("") }
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
When to use
n dr
● Form fields
-a
nu
● Pager/Tab index
ha
● Scroll position
ris
/k
/in
Interview Tip
m
DisposableEffect?
//i
s:
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Examples
oi
SideEffect
dr
SideEffect {
n
println("Recomposition completed!")
-a
}
nu
ha
LaunchedEffect
LaunchedEffect(Unit) {
[Link]()
ris
/k
}
/in
m
DisposableEffect
co
DisposableEffect(Unit) {
[Link]()
n.
onDispose { [Link]() }
di
}
ke
lin
n.
Why reusable?
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Easy maintenance
oi
n dr
-a
Design Principles
nu
✔ Accept only required parameters
ha
✔ Expose callbacks
✔ Avoid internal state → use state hoisting
ris
✔ Keep it stateless whenever possible
/k
/in
@Composable
co
fun PrimaryButton(
text: String,
n.
) {
ke
Button(
lin
onClick = onClick,
modifier = [Link]()
n.
) {
//i
Text(text)
s:
}
tp
}
ht
Best Practice
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
75. What are keys in
n
-a
LazyColumn/LazyRow? Why are they
nu
important?
ha
ris
Definition
/k
Keys are unique identifiers for list items in lazy layouts.
/in
m
co
Purpose
n.
Example
tp
LazyColumn {
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
If you don’t use keys
oi
❌ Item state resets when list changes
❌ Wrong animations
dr
❌ Scrolling jumps
n
-a
nu
ha
76. What is MovableContent in Compose?
ris
Definition
/k
/in
movableContentOf allows a part of the UI to move inside the composition tree while
m
Example
di
}
n.
Column { movable() }
//i
Row { movable() }
s:
tp
ht
Use Cases
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
Interview Tip
n dr
This is useful for shared element transitions.
-a
nu
ha
77. Difference between remember,
rememberSaveable, and ris
/k
/in
rememberUpdatedState.
m
Hook Purpose
co
rememberUpdatedState Example
s:
@Composable
tp
LaunchedEffect(Unit) {
delay(2000)
println([Link])
}
}
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
This ensures side-effects receive updated arguments.
n dr
-a
nu
78. What is snapshot isolation in
ha
Compose?
ris
Definition
/k
/in
Snapshot isolation ensures that state reads and writes do not conflict during recomposition.
m
co
How it works
n.
di
Benefits
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
79. What is Slot Table? How does
oi
dr
Compose store UI?
n
-a
Slot Table is Compose’s internal data structure that stores:
nu
● UI tree
ha
● states
● remembered values
ris
/k
/in
● CompositionLocals
m
co
● Fast lookups
lin
n.
● Efficient updates
//i
How it works
When a Composable runs -> Compose stores structure in the slot table.
During recomposition -> Only specific slots are updated -> performance gain.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
80. What is RememberObserver? What
n
-a
replaced it?
nu
ha
RememberObserver
ris
Used earlier to observe when something enters/leaves composition.
Replacement
co
n.
Use DisposableEffect.
di
ke
Example
lin
DisposableEffect(Unit) {
n.
start()
//i
onDispose { stop() }
}
s:
tp
ht
oi
n dr
① Skipping Phase
-a
nu
Compose first checks if a Composable can be skipped.
ha
A Composable is skipped when:
ris
● No state it reads has changed
/k
● No parameters changed
/in
m
② Recomposition Phase
ke
Compose updates:
n.
//i
● Remembered values
tp
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
③ Apply Phase
oi
dr
Once recomposition finishes:
n
● Compose applies the diff
-a
nu
● UI elements update (Text, Button, Modifier changes)
ha
This ensures only actual UI changes hit the UI layer.
ris
/k
/in
Interview Tip
❗ Recomposition ≠ rendering.
m
co
Reasons
s:
tp
✔ State-driven UI
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
✔ Compose UI Testing Framework
oi
Provides APIs like:
n dr
● onNodeWithText()
-a
nu
● performClick()
ha
● assertIsDisplayed()
ris
/k
✔ No Flaky UI Tests
/in
Example Test
di
@Test
fun verifyButtonClick() {
ke
[Link] {
lin
CounterScreen()
n.
}
//i
[Link]("0").assertExists()
s:
[Link]("Increase").performClick()
tp
[Link]("1").assertExists()
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
83. Explain how StateFlow and Compose
oi
dr
work together.
n
-a
Flow → Compose Integration
nu
collectAsState() converts a Flow into Compose state that triggers recomposition.
ha
Example
ris
/k
val uiState by [Link]()
/in
m
co
Best Practices
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
oi
dr
84. What is derivedStateOf and when
n
-a
should you use it?
nu
ha
Definition
ris
derivedStateOf memoizes an expensive calculation based on state.
/k
/in
Example
ke
derivedStateOf {
[Link] { [Link] }
n.
}
//i
}
s:
tp
ht
Benefits
✔ Performance optimization
✔ Computed only when input dependencies change
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Interview Tip
oi
Useful for lists, search filters, expensive calculations.
n dr
-a
nu
85. What is Ref in Jetpack Compose?
ha
Refs are used inside low-level Compose internals (not common in app development).
ris
Use Cases
/k
/in
● Accessing mutable objects during Recomposition
m
Example
val ref = remember { Ref<String>() }
lin
[Link] = "Hello"
n.
//i
s:
Interview Takeaway
tp
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
86. Explain the difference between
oi
dr
[Link] vs PaddingValues.
n
-a
[Link]
nu
Used to add space FOR a Composable.
ha
Text("Hello", modifier = [Link]([Link]))
ris
/k
/in
PaddingValues
m
Example in LazyColumn:
n.
LazyColumn(
di
contentPadding = PaddingValues([Link])
ke
)
lin
n.
//i
Key Difference
s:
[Link] PaddingValues
tp
Composable internally
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
87. What are Reusable Modifiers and why
oi
dr
should you create them?
n
-a
Reusable modifiers help maintain clean code and consistent design.
nu
ha
Example
ris
fun [Link]() = [Link]( /k
[Link]([Link], RoundedCornerShape([Link]))
)
/in
m
Usage:
co
Box(modifier = [Link]())
n.
di
ke
Benefits
lin
n.
✔ Reduces duplication
✔ Uniform UI
//i
Interview Tip
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
88. What are Skippable (Stable) and
oi
dr
Non-Skippable (Unstable) Composables?
n
-a
Stable
nu
Composable’s parameters did not change → Skip recomposition.
ha
Unstable
Example Stable
ht
@Immutable
data class User(val id: Int, val name: String)
oi
✔ Improves performance
✔ Cleaner UI rendering
n dr
-a
nu
89. What is animate*AsState API in
ha
Jetpack Compose?
ris
Used for simple, single-value animations.
/k
/in
m
Example
co
0f)
di
ke
lin
How it works
n.
oi
✔ Color
✔ Size
dr
✔ Rotation
n
-a
nu
Interview Tip
ha
For complex animations, use updateTransition.
ris
/k
/in
use it.
co
n.
Example
n.
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
✔ Synchronize multiple animations
oi
✔ Cleaner animation code
✔ Smooth UI transitions
n dr
-a
Interview Tip
nu
ha
Perfect for expandable cards & complex animated UI widgets.
ris
/k
91. What is a Slot Table in Jetpack
/in
m
The Slot Table is one of the core internal data structures Compose uses to track:
n.
di
● UI tree structure
ke
● Remembered values
lin
● Composition groups
n.
//i
● State references
s:
tp
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Group (a node)
oi
● Position in Slot Table
n dr
● Any remembered objects → stored in slots
-a
nu
● Keys → to restore state later
ha
When recomposition occurs, the slot table:
ris
● Compares new composition with previous /k
/in
● Determines which nodes need updating
m
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Interview Tip
oi
dr
You don't manipulate slot tables yourself → but understanding it shows strong knowledge of
Compose internals.
n
-a
nu
ha
92. Explain the function & role of the
Composer.
ris
/k
/in
The Composer is the engine that:
m
✔ Responsibilities of Composer
ht
1. Record Composition
2. Trigger Recomposition
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
When state changes → Composer marks affected nodes as dirty.
oi
3. Restore Remembered Values
n dr
When nodes are re-executed, Composer matches keys → restores values.
-a
nu
4. Apply UI Changes
ha
After recomposition → Composer issues UI updates to rendering layer.
ris
/k
Interview Summary
/in
m
for performance?
lin
n.
Skipping means:
//i
A composable is not recomposed when its inputs and read states haven’t changed.
s:
tp
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● No effects triggered
oi
n dr
-a
✔ Why skipping matters?
nu
● Boosts performance massively
ha
● Prevents unnecessary UI work
Example
n.
@Composable
di
}
lin
n.
//i
Interview Note
s:
oi
● Identify items in lists
n dr
● Preserve state for each composable
-a
● Avoid recomposing wrong items
nu
ha
✔ Example ris
/k
/in
items(users, key = { [Link] }) { user ->
UserRow(user)
m
}
co
n.
[Link] stabilizes identity → Compose knows which slot belongs to which element.
di
ke
lin
Stable Key
n.
Unstable Key
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Changes frequently → Compose may lose track of state.
oi
Example bad key:
n dr
key = { [Link]() }
-a
nu
ha
Interview Tip
ris
Keys = foundation of LazyColumn performance + state correctness.
/k
/in
✔ How It Works
n.
//i
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
It scans slot table and builds a list of groups to recompose.
oi
4. Recomposition is executed
n dr
Composer re-executes only the dirty composables.
-a
nu
5. UI changes applied
ha
Diffs are applied to UI tree efficiently.
ris
/k
Interview Advantage
/in
m
Compose?
lin
n.
✔ Key Features
ht
● Supports transactions
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Ensures consistency during recomposition
oi
n dr
-a
Example (concept)
nu
[Link]()
ha
ris
Compose is built on multiversion concurrency control (MVCC).
/k
/in
Interview Tip
m
Compose?
n.
//i
● State-driven
tp
ht
● Frame-based
● Coroutine-backed
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
✔ Internals
oi
dr
1. Animation state changes (targetValue).
n
-a
2. AnimationClock emits frame timestamps.
nu
3. Value interpolated (tween, spring, keyframes).
ha
4. Each frame triggers recomposition.
Types of animations
co
Interview Tip
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
98. What is SubcompositionLayout and
oi
dr
why is it used?
n
-a
SubcomposeLayout allows deferred composition.
nu
ha
✔ Use Cases
ris
● Compose content depending on measured size
/k
/in
● Collapsing toolbar
m
● Tabs
co
n.
layout(width, height) {
[Link](0, 0)
[Link](0, [Link])
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
}
oi
}
n dr
-a
Interview Tip
nu
This is one of the toughest advanced Compose UI concepts → rarely used but highly important.
ha
ris
/k
99. What is Pointer Input System in
/in
Compose?
m
co
[Link](Unit) {
n.
// Handle drag
}
s:
}
tp
ht
Internally
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
● Handles multi-touch events
oi
● Integrates with gesture detectors
n dr
-a
nu
Common APIs
ha
● detectTapGestures
ris
● detectDragGestures
/k
/in
● scrollable
m
Modifiers?
s:
tp
Krishanu Nandan
Senior Android Developer
Follow - [Link]
d
Example detectDragGesture [Link]
oi
s
n dr
-a
Example Gesture Detector (Click)
nu
[Link] { }
ha
Example Pointer Input ris
/k
/in
[Link](Unit) {
awaitPointerEventScope {
m
// Advanced gestures
co
}
n.
}
di
ke
Interview Tip
lin
n.
Pointer input system is powerful but rarely needed for standard UIs.
//i
s:
tp
ht
Krishanu Nandan
Senior Android Developer
Follow - [Link]