• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mitchtabian/MVVMRecipeApp: Kotlin, MVVM, Navigation Component, Hilt, Jetpack Com ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

mitchtabian/MVVMRecipeApp

开源软件地址(OpenSource Url):

https://github.com/mitchtabian/MVVMRecipeApp

开源编程语言(OpenSource Language):

Kotlin 100.0%

开源软件介绍(OpenSource Introduction):

What is this project?

This course will replace my old java mvvm introduction: https://codingwithmitch.com/courses/rest-api-mvvm-retrofit2/.

Watch the new course here: https://codingwithmitch.com/courses/jetpack-compose-mvvm-for-beginners/

This is a beginner course.

Main Features

  1. Kotlin
  2. MVVM
  3. Jetpack Compose
  4. MutableState
    • Simpler than LiveData or Flow with respect to composables.
  5. Hilt
  6. Navigation Components
  7. Retrofit2
  8. Single Activity Architecture
  9. App Themes
  10. Custom Fonts
  11. Light and Dark theme
    • Toggle between themes

Compose features

  1. Snackbars
  2. Dialogs
  3. Theming
  4. Fonts
  5. Colors
  6. Animations introduction
    • creating a 'shimmering' loading animation
  7. ConstraintLayout
  8. Rows
  9. Columns
  10. Scaffold
  11. AppBar
  12. Circular Progress Indicator

Why not Flow or LiveData?

  1. LiveData
    • LiveData has always been a love/hate thing for me. It's great for some things but can be very annoying for others. For example you MUST have an observer for livedata to emit anything. Making it pretty useless in a repository or anywhere except viewmodel->view communication.
  2. Flow
    1. Flow is great. I use flows for my use cases when building out clean architecture. You don't need an "android observer" because flow lives in the coroutine world and there's even support for operators like RxJava has.
    2. Easily converted from livedata with a single function call.
    3. Tons of other useful properties. Check out the flow docs.
  3. StateFlow
    1. StateFlow is the newest addition to kotlinx.coroutines.flow. Simply put StateFlow is a flow with special properties.
    2. Originally I had planned to use StateFlow in this course but it's really just totally unnecessary. I don't want to show you an unrealistic example of how to use something so I'm sticking with the very simple MutableState in viewmodels.

References

  1. https://github.com/android/compose-samples
  2. https://developer.android.com/jetpack/compose
  3. https://developer.android.com/jetpack/compose/state
  4. Color system



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap