Code

Accessing screen arguments in ViewModels using SavedStateHandle

One of the common use cases I have noticed when using `HiltViewModel`’s(or normal `ViewModel`) is figuring out how to provide runtime screen arguments. Usually the ones you send as intent extras or fragment arguments. In this article let's take a look at how you can use `SavedStateHandle` to read screen arguments.

Read
Code

Using ViewModels in custom views

Let's take a look at how we can use `ViewModel`'s in custom views using `ViewTreeViewModelStoreOwner`

Read
Code

Adopting Jetpack Compose: ComposeView

Using Compose UI in the existing codebase in important to iteratively migrating over to Compose. Let's take a look at how you can use `ComposeView` and `AbstractComposeView` to do that.

Read
Code

Adopting Jetpack Compose: Theming

So now that Jetpack Compose is stable, let's look at how you can start adopting Compose to your existing project. Starting with theming 🎨

Read
Code

Gradle version catalog for better dependency management

Gradle version catalog feature allows us to share dependencies between different projects or modules. In this article, we will take a look at why we need to use this feature compared to other solutions and how to configure and use Gradle version catalog.

Read