AceMobileInterview

Interview guides / android

Janky news list: Android Interview Question

Janky news list interview question with a clear example answer for Android engineers. Practice with AceMobileInterview.

This is a common Android interview topic: Janky news list.

Below is a concise answer you can adapt in a real interview, then go deeper in the full AceMobileInterview track.

  1. 1.Download the buggy Android zip. Opening the list with a large payload janks the UI. Find wrong-thread work and fix it (≈45–60 min).

    ## Scenario Compose/list screen freezes while parsing a large bundled JSON feed. ## How to investigate - Reproduce on launch with `assets/feed.json` - Android Studio CPU Profiler / Systrace - Search for `readText` / `Json.decodeFromString` on the main path ## Planted bug 1: Parse on Main **Symptom:** Frame freeze on first frame **Root cause:** Repository reads assets and decodes on `Dispatchers.Main` (or callers use `runBlocking` on main) **Fix:** `withContext(Dispatchers.Default)` for parse; `Dispatchers.IO` for asset read ## Planted bug 2: Bitmap work on UI thread **Symptom:** Scroll jank **Root cause:** `BitmapFactory.decodeByteArray` inside item composable / bind **Fix:** Decode on background; cache; use a proper image loader as stretch ## Planted bug 3: Architecture smell **Symptom:** Hard to test **Root cause:** Activity/ViewModel reaches into assets directly **Fix:** `FeedRepository` interface; inject fake in tests ## Optimization tips - Never `runBlocking` from a Composable - Prefer `StateFlow` updates after background work completes ## What to say in the interview - How you proved main-thread work before refactoring - What metric you re-checked after (time-to-content, jank frames)

Keep going with AceMobileInterview

Reading helps. Timed practice locks it in. Jump into the interactive track for algorithms with LeetCode links, studio projects, debugging zips, and mobile system design.

iOS trackAndroid trackMore guides