Posts

Showing posts with the label Jetpack Compose

Ultimate Android SDE2/SDE3 Interview Roadmap (2026)

Image
Complete Roadmap for Senior Engineers Android interviews have changed significantly over the last few years. It is no longer enough to memorize activity lifecycle callbacks, RecyclerView optimizations, MVVM definitions, or basic coroutine syntax. Senior Android interviews now focus much more on architecture tradeoffs, scalability, debugging ability, performance optimization, concurrency reasoning, Jetpack Compose internals, modularization strategies, and production engineering decisions. This roadmap is designed for Android engineers preparing for modern SDE2 and SDE3 interviews. It brings together the most important topic areas into one structured series so you can move from fundamentals to senior-level reasoning in a deliberate way. Best for: Android engineers targeting product companies, senior Android roles, architecture-heavy rounds, and system design discussions. Why This Roadmap Matters A few yea...

Cracking Android SDE2/SDE3 Interviews in 2026: Deep Dives, Code, Follow-ups | Part-5

Image
  51. Custom View onMeasure? When you implement a custom View , you’re participating in Android’s three-phase rendering pipeline : Measure phase → onMeasure Layout phase → onLayout Draw phase → onDraw Each phase has a strict responsibility . Mixing them is a common junior mistake. 1️⃣ onMeasure()  — How big do you want to be? Purpose onMeasure() decides how much space the View needs , based on: Parent constraints ( MeasureSpec ) Your content Padding Desired intrinsic size It does NOT position anything and must not draw . Understanding MeasureSpec Each dimension comes as an Int encoding: Mode Size Modes        Correct Mental Model Think of onMeasure() as a negotiation : Here’s what I want” vs “Here’s what the parent allows Android provides helpers to avoid mistakes. Best Practice Implementation Pattern override fun onMeasure (widthMeasureSpec: Int , heightMeasureSpec: Int ) { val desiredSize = paddingLeft + contentSize + paddingRight ...