Loading...
Loading...
Loading...

Journal

A screen that survives rotation is not necessarily safe from process death. A ViewModel keeps state through configuration changes, but Android can kill a background process to reclaim memory. When the user returns, a new ViewModel is created, and any form values or edits stored only in the old one are gone. Testing rotation alone can therefore hide an important state-restoration failure. Use the storage that matches the data: rememberSaveable for small UI state, SavedStateHandle for small values needed to rebuild a screen, and a database, DataStore, or backend for important or lasting data. For an edit screen, saving an orderId and loading the latest order is often better than saving the full object in SavedStateHandle. Test the real scenario by backgrounding the app, killing its process, and reopening it from Recent Apps to confirm that the screen can rebuild itself.

View all journal entries
3 years ago 2.8K

Kotlin Coroutines (2/3)

Continue our Coroutines talk. Let's discuss Coroutines Context.

mohamad-abuzaid
Mohamad Abuzaid
1
Kotlin Coroutines 1
3 years ago 3.1K

Kotlin Coroutines (1/3)

What is Coroutines? How do we use it? and What are its main components?

mohamad-abuzaid
Mohamad Abuzaid
1
Dependency Injection-quick overview
3 years ago 2.8K

Dependency Injection-quick overview

What are DI benefits?, What is the difference between (DI) and Service Locator? and when n...

mohamad-abuzaid
Mohamad Abuzaid
1
Software Architecture Patterns
3 years ago 3.0K

Architecture Patterns (MVC-MVP-MVVM)

With Android/Kotlin sample code.

mohamad-abuzaid
Mohamad Abuzaid
1
3 years ago 2.4K

HashMap Operations Complexity O(N)

What is HashMap complexity [Big O] for operations like read or write?

mohamad-abuzaid
Mohamad Abuzaid
1
kotlin_interview_tips
3 years ago 2.5K

Kotlin Scope Functions

What are the "Scope Functions"? What are the difference between them?

mohamad-abuzaid
Mohamad Abuzaid
1
3 years ago 3.5K

Design Patterns - [3] Behavioral

Continue our software design patterns overview and a closer look at the Behavioral pattern...

mohamad-abuzaid
Mohamad Abuzaid
2
3 years ago 3.7K

Design Patterns  -  [2] Structural

Continue our software design patterns overview and a closer look at the Structural pattern

mohamad-abuzaid
Mohamad Abuzaid
1
3 years ago 3.6K

Design Patterns - [1] Creational

Overview on software design patterns and a closer look at the Creational pattern

mohamad-abuzaid
Mohamad Abuzaid
1
android-interview-tip
3 years ago 2.5K

In Dagger 2 Dependency Injection...

What is the difference between @Provides, @Binds and @Inject ?

mohamad-abuzaid
Mohamad Abuzaid
1
kotlin-interview-tip
3 years ago 2.4K

In Kotlin Coroutines...

What is the difference between Flow, StateFlow and SharedFlow?

mohamad-abuzaid
Mohamad Abuzaid
1
Jetpack Compose review
3 years ago 4.3K

Jetpack Compose — quick review

A quick review on Jetpack Compose going through some of its main topics.

mohamad-abuzaid
Mohamad Abuzaid
2
solid principles explained
3 years ago 2.4K

SOLID principles explained

Lets talk about SOLID principles. What they mean? and How are they useful?

mohamad-abuzaid
Mohamad Abuzaid
1