
Explain val vs var in Kotlin and null safety risks
WHAT IT TESTS: Kotlin mutability and compile-time null safety. ANSWER OUTLINE: val is read-only, var is mutable; nullables use ? like String?; risk is NullPointerException if checks are missed. RED FLAG: Calling val deep immutability or defaulting to !!.

Navigate between feature modules without direct dependencies?
Tests dependency inversion in modular apps. Answer by defining navigation interfaces in a shared module, implementing them in the :app module, and using DI to connect them. A red flag is suggesting direct module dependencies or using reflection for navigation.

Combine two network sources using Coroutines and Flow
Tests your grasp of async data combination and state management. A good answer uses Flow.combine in a ViewModel, fed by a Repository, emitting a sealed class for UI state (Loading, Success, Error). A red flag is trying to combine state in the UI layer itself.

Explain the purpose of a UseCase or Interactor layer
Tests your grasp of separation of concerns. A great answer defines a UseCase as a single, reusable business operation that sits between the ViewModel and Repository. It keeps other layers clean and focused.

How do you share a ViewModel between Fragments?
Tests your understanding of ViewModel lifecycle scoping beyond a single screen. To share, scope the ViewModel to the parent Activity or a navigation graph using `activityViewModels()` or `navGraphViewModels()`.

How to use a nested navigation graph for a login flow?
Tests your ability to structure complex UI flows using Navigation Component. A great answer defines a separate login graph XML, includes it in the main graph, and navigates to the graph's ID. This encapsulates the flow, making it reusable.

Why is LiveData<Boolean> bad for one-time ViewModel events?
Tests if you know LiveData holds state, not events. A good answer explains that LiveData re-emits on configuration changes, causing repeated events. The solution is to model events as part of the UI state and consume them.

How do you pass data between Fragments with Jetpack Navigation?
Tests knowledge of modern, type-safe argument passing. A good answer defines the argument in the nav graph XML, uses the Safe Args plugin to generate Directions/Args classes, navigates with the action, and retrieves the data in the destination via `by…

Explain ViewModel, Repository, and Data Source in MVVM
This tests your understanding of separation of concerns. A great answer defines ViewModel (UI state), Repository (data abstraction), and Data Sources (implementation), then explains the unidirectional data flow.

What is a Jetpack ViewModel and the problem it solves?
This tests your understanding of lifecycle-aware state preservation. A good answer explains that ViewModels survive configuration changes (like rotation) to hold UI data, separating it from the transient UI controller.

How do you diagnose and fix excessive recomposition in Jetpack Compose?
This tests your grasp of Compose's stability system. First, use Layout Inspector to find high-recomposition areas. Then, enable and analyze the Compose compiler report to diagnose unstable parameters (like List) or lambdas.

`remember` vs. `rememberSaveable`: When and why to use each?
Tests understanding of state survival in Compose. A good answer contrasts `remember` (for composition) with `rememberSaveable` (for activity recreation/process death), explaining its use of the `Bundle` mechanism. A red flag is confusing the two lifecycles.

How to implement efficient large lists in Jetpack Compose?
This tests your grasp of Compose performance. Use `LazyColumn` to compose only visible items, unlike a `Column` which renders all items at once. A red flag is suggesting a scrollable `Column`, which has severe performance costs for large lists.

Which Compose side-effect for a one-time coroutine action?
Tests if you can choose the right Compose side-effect for a one-time coroutine. A great answer names `LaunchedEffect(Unit)`, explains it runs once and cancels on exit. A red flag is suggesting `rememberCoroutineScope` directly in the composable body.

Describe the state hoisting pattern in Compose
Tests your grasp of unidirectional data flow. Explain state hoisting is moving state up to make composables stateless. This enables reusability, easier testing, and a single source of truth. A red flag is just describing the mechanics without the benefits.

Explain Recomposition in Jetpack Compose
This tests your core understanding of Compose's declarative model. Explain that recomposition is re-running composables when state they read changes. Mention that Compose optimizes by only recomposing the nearest scope and skipping composables with stable…

How do you arrange UI elements in Jetpack Compose?
Tests your grasp of Compose's declarative layout model. Explain `Row` (horizontal) and `Column` (vertical) as the core layout composables. Define `Modifier` as the standard way to configure size, spacing, and behavior.

What is the purpose of `remember` in Jetpack Compose?
This tests your grasp of Compose's recomposition lifecycle. A good answer explains `remember` caches an object across recompositions, preventing state loss. It's used with `mutableStateOf` to hold the same state instance.

Android Style vs. Theme and Attribute Resolution
Tests your grasp of Android's resource scope and resolution timing. A Style targets a single View, while a Theme applies to a whole Context. `@color/` is a direct, compile-time link; `?attr/` is an indirect pointer resolved against the Theme at runtime.

LinearLayout vs. RelativeLayout vs. FrameLayout
This tests your knowledge of fundamental View layouts and performance trade-offs. Define LinearLayout (single axis), RelativeLayout (relative positioning), and FrameLayout (stacking), giving a clear use case for each.