ArchitectureComponentsDemo
Kotlin demo project that uses some Android Architecture Components (ViewModel and LiveData) with Dagger 2 and Coroutines
Install / Use
/learn @fabioCollini/ArchitectureComponentsDemoREADME
Android Architecture Components Demo
This is a Kotlin project that uses some Android Architecture Components (ViewModel and LiveData) with Dagger 2 and RxJava.
This project is a fork of official GithubBrowserSample, I converted it to kotlin and modified some architectural aspects to test ViewModel and LiveData features.
Main concepts
- each ViewModel manages an immutable ViewState (implemented using a Kotlin data object)
- a post will be available soon to explain the details of how the ViewModels and the UseCases manage the ViewStates
- multi module project, thanks to Dagger Android the ui is splitted in multiple modules
- Fragment args are managed using a companion object base class
- JVM tests are written using Mockito and AssertK
- Espresso tests are written using DaggerMock and Mockito
- ViewModels are instantiated using a custom factory defined in Dagger application scope and replaced with a stub in Espresso tests
- asynchronous tasks are managed using Coroutines (the rxjava branch contains the same example with RxJava singles instead of coroutines)
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
