- API KEY is managed as confidential information (
local.properties
) - ui layer
- There is only one
Statefull @Composable function
(because check the layout in Preview depending on the state). - Create a
stateless Composable
and create aPreview Composable
for each UiState - use Scaffold content paddingValues
- If simple logic, Call Repository (Interface) directly from ViewModel.
- Error handling(try catch) is done by ViewModel
- Threading
- The file named ViewModel is a StateHolder.
- There is only one
- domain layer
- Pure Kotlin.
- Threading
- DO inject Dispatchers (Default Thread)
- data layer
- Model(Serialize).
- For small apps, don't create "domain entity" and "mapper". Use "data entity" directly in the UI layer
Error handling and returning a custom Exception instance (Does not Use kotlin.Result)- throw custom Exception instance
- Threading
- DO inject Dispatchers (IO Thread)
- Proguard / R8
OS: 8.0 (API Level 26) or later.
-
Features
- UI
- DI
- Dagger Hilt
- Unit Test
- Network
- (retrofit, okhttp, moshi)
- local
- Room
- datastore (Under implementation)
- Web API
- (Unsplash)
- app architecture
- single module
- Single Activity, No Fragments
- Navigation
- Navigation Graph & Nest Navigation
- other
-
capture
Pixel 4 OS12 |
---|
![]() |
https://android-developers.googleblog.com/2021/12/rebuilding-our-guide-to-app-architecture.html?m=1
https://developer.android.com/jetpack/guide/ui-layer
https://developer.android.com/jetpack/guide/domain-layer
https://developer.android.com/jetpack/guide/data-layer
Entities
https://developer.android.com/jetpack/compose/mental-model
https://github.com/android/compose-samples
https://github.com/LeoAndo/droidkaigi2021-memo/labels/Jetpack%20Compose
https://github.com/LeoAndo/droidkaigi2021-memo/issues?q=is%3Aopen+is%3Aissue+label%3A%22Jetpack+Compose+1.1%22
https://developer.android.com/jetpack/compose/text?hl=ja
https://m3.material.io/
https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/NavigationBarSamples.kt?hl=ja
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:navigation/navigation-compose/samples/src/main/java/androidx/navigation/compose/samples/NavigationSamples.kt?hl=ja