Skip to content
tezvyn:

All bites

The whole library, newest first. Filter by what you are here for, or pick a topic if you already know.

4330 bites

Page 198

Explain the difference between LinearLayout, RelativeLayout, and FrameLayout
Android & Kotlin2 min read

Explain the difference between LinearLayout, RelativeLayout, and FrameLayout

Understanding of ViewGroup measurement and simplicity versus flexibility tradeoffs. LinearLayout for 1D lists, RelativeLayout for complex sibling rules, FrameLayout for single-child or overlap.

LinearLayout vs. RelativeLayout vs. FrameLayout
Android & Kotlin2 min read

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.

LinearLayout vs. RelativeLayout vs. FrameLayout: Explain and give use cases
Android & Kotlin2 min read

LinearLayout vs. RelativeLayout vs. FrameLayout: Explain and give use cases

Tests your grasp of classic Android layouts and performance trade-offs. A good answer defines each, gives a clear use case, and mentions layout_weight. A red flag is proposing nested LinearLayouts for complex UIs, ignoring performance.

Difference between Style and Theme, and how ?attr/ resolves vs @color/
Android & Kotlin2 min read

Difference between Style and Theme, and how ?attr/ resolves vs @color/

Probes Android resource indirection depth. A style targets one View; a theme targets a Context. ?attr/ resolves dynamically against the current theme at runtime, but @color/ is a static compile-time constant. Red flag: saying both resolve the same way.

Android Style vs. Theme and Attribute Resolution
Android & Kotlin2 min read

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.

Styles vs. Themes and Attribute Resolution in Android
Android & Kotlin2 min read

Styles vs. Themes and Attribute Resolution in Android

This tests your grasp of Android's resource indirection. A Style is a set of attributes for one View type. A Theme is a collection of named attributes for an app or Activity. ?attr is resolved at runtime against the Theme, while @color is a direct.

Android & Kotlin2 min read

How does ConstraintLayout enable flat responsive UIs with chains and barriers?

It tests constraint-based positioning and flat hierarchy performance. A strong answer covers relative constraints replacing nested layouts, chains for distributing groups, and barriers for dynamic alignment to extreme edges.

Android & Kotlin2 min read

Explain ConstraintLayout, Chains, and Barriers

Tests your grasp of performant Android UIs. Explain how ConstraintLayout flattens hierarchy, use chains to distribute groups of views (e.g., packed), and use barriers to align elements against dynamic content.

Android & Kotlin2 min read

How does ConstraintLayout enable complex, responsive UIs?

Tests your grasp of modern Android UI performance and responsiveness. Explain how relative positioning flattens hierarchies, then define chains for distributing space and barriers for handling dynamic content size.

What is remember in Compose and how do you use mutableStateOf?
Android & Kotlin2 min read

What is remember in Compose and how do you use mutableStateOf?

This tests state survival across recompositions. Good answers say remember caches values across recompositions, pairs with mutableStateOf for observable state, and shows a counter. A red flag is mutableStateOf without remember, state resets per recomposition.

What is the purpose of `remember` in Jetpack Compose?
Android & Kotlin2 min read

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.

What is the purpose of the `remember` function in Compose?
Android & Kotlin2 min read

What is the purpose of the `remember` function in Compose?

This tests your grasp of recomposition. Explain that remember stores an object in the composition tree, preventing it from being re-initialized on every render. A red flag is confusing it with rememberSaveable, which survives configuration changes.

Arrange UI elements vertically or horizontally in Jetpack Compose
Android & Kotlin2 min read

Arrange UI elements vertically or horizontally in Jetpack Compose

Tests declarative layout fundamentals. Good answers name Column and Row, explain Modifier as an ordered chain of decoration and layout behavior, and note order changes semantics. Red flag: calling Modifier "just styling" or confusing it with LinearLayout.

How do you arrange UI elements in Jetpack Compose?
Android & Kotlin2 min read

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.

How to arrange UI elements in Jetpack Compose?
Android & Kotlin2 min read

How to arrange UI elements in Jetpack Compose?

This tests your grasp of Compose's declarative layout basics. A good answer defines Column (vertical) and Row (horizontal) for structure, and Modifier for decoration, size, and behavior. A red flag is confusing Modifiers with simple styling.

Explain Jetpack Compose recomposition, its triggers, and optimizations.
Android & Kotlin2 min read

Explain Jetpack Compose recomposition, its triggers, and optimizations.

This tests grasp of Compose's reactive model. A strong answer defines recomposition as recomputing composables when state changes, notes State triggers it, and explains Compose skips unchanged subtrees via smart tracking.

Explain Recomposition in Jetpack Compose
Android & Kotlin2 min read

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…

Explain Recomposition in Jetpack Compose
Android & Kotlin2 min read

Explain Recomposition in Jetpack Compose

Tests your grasp of Compose's declarative model. A good answer defines recomposition, explains state-read triggers, and details how stability and positional memoization enable skipping. A red flag is assuming any state change redraws the entire UI.

Describe state hoisting and its benefits in Compose
Android & Kotlin2 min read

Describe state hoisting and its benefits in Compose

Move state to the caller, pass value and event lambda down, keep them stateless.

Describe the state hoisting pattern in Compose
Android & Kotlin2 min read

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.