Stopping the Rotation Crash: Managing UI State with ViewModel and LiveData
Learn how to use ViewModel and LiveData to prevent data loss and crashes during Android configuration changes like screen rotations.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to use ViewModel and LiveData to prevent data loss and crashes during Android configuration changes like screen rotations.
WorkManager is Android's recommended API for deferrable, guaranteed background work with constraints. Learn Worker setup, OneTimeWorkRequest with charging and network constraints, limits and common mistakes.
Android's Rect class enables zero-allocation geometry math in UI code, but its mutable API demands discipline. Learn when to reuse instances for hit-testing performance and when to copy to avoid race conditions and stale-state bugs.
When a Titanium app loads large images from URLs, Android may crash or fail to display them. This guide walks through symptoms, diagnostic steps, and fixes—from scaling and redirect handling to caching—to help developers resolve memory and display issues.
Android developers face a trade-off between integer-based Rect and float-based RectF for touch hit detection. This guide compares the options and shows a code snippet to validate the choice.
Diagnose and resolve Android main‑thread ANRs with a step‑by‑step guide: spot UI freezes, identify root causes, run Ordered checks, apply fixes, and know when to ask OEMs for help.
Fix zero-width Rects, false contains() results, and missed intersections by checking coordinate order, layout timing, and coordinate space.
Hermes can shrink your React Native JS bundle and speed startup, but it changes debugging and may break native modules. Verify before you ship.
State hoisting moves mutable state out of composables, turning them into pure UI functions. Learn why, how, and when to hoist state in Jetpack Compose for better testability and reuse.