Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leoando/androidcomposeunsplashapp

jetpack compose demo app
https://github.com/leoando/androidcomposeunsplashapp

android android-architecture android-compose android-room architecture jetpack-compose material-design-3 mvvm-android unsplash-api

Last synced: about 1 month ago
JSON representation

jetpack compose demo app

Awesome Lists containing this project

README

        

# Developement Environment

スクリーンショット 2021-12-18 13 53 22

# App architecture

スクリーンショット 2021-12-20 15 58 59

# implementation Rules

- 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 a `Preview Composable` for each UiState](https://github.com/LeoAndo/android-compose-templates/pull/18#discussion_r786196548)
- [use Scaffold content paddingValues](https://github.com/LeoAndo/android-compose-templates/pull/34)
- If simple logic, Call Repository (Interface) directly from ViewModel.
- [Error handling(try catch) is done by ViewModel](https://github.com/LeoAndo/android-compose-templates/blob/main/app/src/main/java/com/example/templateapp01/ui/favorite/FavoriteViewModel.kt#L24:L27)
- [Threading](https://developer.android.com/jetpack/guide/ui-layer#threading-concurrency)
- The file named ViewModel is a StateHolder.
- domain layer
- Pure Kotlin.
- [Threading](https://developer.android.com/jetpack/guide/domain-layer#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](https://www.youtube.com/watch?t=79&v=cfak1jDKM_4&feature=youtu.be)
- ~~Error handling and returning a custom Exception instance ([Does not Use kotlin.Result](https://github.com/LeoAndo/android-compose-templates/pull/45))~~
- [throw custom Exception instance](https://github.com/LeoAndo/android-compose-templates/blob/main/app/src/main/java/com/example/templateapp01/data/Result.kt#L54:L64)
- [Threading](https://developer.android.com/jetpack/guide/data-layer#threading)
- DO inject Dispatchers (IO Thread)
- Proguard / R8
- [Use only stable libraries](https://github.com/LeoAndo/AndroidAppTemplate/issues/40#issue-925121453)

# Supported OS Version

OS: 8.0 (API Level 26) or later.

# Template01

- [coding flow](https://github.com/LeoAndo/android-compose-templates/pulls?q=is%3Apr+is%3Aclosed)

- Features
- UI
- [Material3](https://m3.material.io/)
- DI
- Dagger Hilt
- Unit Test
- [test](https://github.com/LeoAndo/android-compose-templates/tree/main/app/src/test/java)
- [sharedTest](https://github.com/LeoAndo/android-compose-templates/tree/main/app/src/sharedTest/java/com/example/templateapp01)
- [androidTest](https://github.com/LeoAndo/android-compose-templates/tree/main/app/src/androidTest/java/com/example/templateapp01)
- Network
- (retrofit, okhttp, moshi)
- local
- Room
- datastore (Under implementation)
- Web API
- ([Unsplash](https://unsplash.com/documentation))
- app architecture
- single module
- Single Activity, No Fragments
- Navigation
- Navigation Graph & Nest Navigation
- other
- [buildSrc](https://github.com/LeoAndo/android-compose-templates/pull/4)
- [Manage secret key](https://github.com/LeoAndo/android-compose-templates/pull/9)
- [SplashScreen](https://github.com/LeoAndo/android-compose-templates/pull/2)

- capture

| Pixel 4 OS12 |
|:---|
| |

# refs

## about app architecture
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://youtu.be/cfak1jDKM_4?t=79)

## about compose
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

## about material3
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

## about Expert
https://github.com/arriolac