event-emitter
jetpack-navigation-ftue-sample
event-emitter | jetpack-navigation-ftue-sample | |
---|---|---|
9 | 6 | |
78 | 237 | |
- | - | |
0.0 | 2.5 | |
about 1 year ago | 10 months ago | |
Java | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
event-emitter
-
ViewModel: for UI business, not UI operations 😮
If you mean UI events like the events from the Model to the UI, then you can use a sealed class and a Channel or EventEmitter
-
Kotlin Flow implementation of SingleLiveEvent
I can also comment https://github.com/Zhuinden/event-emitter 😛
-
Sending View Model Events to the UI (is this how people are handling Navigation and Snackbars now?)
For events, I use https://github.com/Zhuinden/event-emitter with https://github.com/Zhuinden/live-event
-
What's the proper way of accessing a Composable function from a non-composable one?
I use https://github.com/Zhuinden/event-emitter for this sort of thing via DisposableEffect(Unit) {
-
MVVM and one shot operations
If there isn't multiple screen switches involved, I use https://github.com/Zhuinden/event-emitter
-
LiveData is superior to StateFlow for UI and ViewModel layer.
That's why I wrote EventEmitter and never had a problem.
-
What is your currently configured SharedFlow implementation ?
I use BehaviorRelay in place of MutableStateFlow/MutableLiveData, and I use EventEmitter in place of uh, SingleLiveEvent I guess.
-
LiveData vs SharedFlow and StateFlow in MVVM and MVI Architecture
Well I've been using this which is merely a lifecycle-aware wrapper over this, if you're in Kotlin and you are using coroutine stuff then you can also use Channel(UNLIMITED) with receiveAsFlow()
jetpack-navigation-ftue-sample
-
Any Modern examples of using only 1 activity, but multiple(lots of) fragments in a non trivial app
Not a complex example per say, but I did write this sample and it'd scale as it looks right now, just more packages in core and in features.
-
How to properly handle conditional navigation with dynamic starting destination whhen using navigation component?
The whole circus around login/logout is a mess in jetpack navigation. It assumes a world where your app always has a fixed starting point which imo doesn't make sense with apps where the entire content is behind auth. I recommend checking out https://github.com/Zhuinden/jetpack-navigation-ftue-sample
-
LiveData vs SharedFlow and StateFlow in MVVM and MVI Architecture
A simplified variation can be seen in this repo, a LiveData variant with Jetpack stuff can be seen in this repo, my issue with this sample is that as there is no input + debounce + filter + async data load example in it, there is no switchMap (and even for combineTuple, I can use my other helper validateBy here), and those would be key to understanding the difference in terms of expressibility and power...
-
I'm looking for a good sample codebase to review/learn from that uses MVVM, live data, compose and either dagger or hilt. Any suggestions?
I have a non-Compose "MVVM + Hilt" sample here
-
Things seem to be shockingly complex in Android dev now
See https://github.com/Zhuinden/jetpack-navigation-ftue-sample/blob/master/app/src/main/java/com/zhuinden/jetpacknavigationdaggersavedstatehandleftueexperiment/features/login/LoginViewModel.kt#L30-L41
-
Hilt alpha 0.0.3
Yes it works wonders
What are some alternatives?
Kotlin_Flow_To_The_View - PoC using Flow completely on an Android Projet with MVVM architecture. No LiveData. The advantage over simply using the viewModelScope is the fact that 5 seconds after leaving the application (not killing it !), the coroutine is cancelled, avoid possibly unnecessary work.
tivi - Tivi is a TV show tracking Android app, which connects to trakt.tv
androidx - Development environment for Android Jetpack extension libraries under the androidx namespace. Synchronized with Android Jetpack's primary development branch on AOSP.
architecture-components-samples - Samples for Android Architecture Components.
navigator - A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).
jetflix - Movie listing app using Jetpack Compose and Tmdb api
live-event - [ACTIVE] Lifecycle-aware wrapper over EventEmitter, for modelling one-off events.
android-mvvm-dagger-rxjava-retrofit - A sample project which demostrate use of MVVM and Dagger 2 with RxJava2 along with Retrofit
compose-destinations - Annotation processing library for type-safe Jetpack Compose navigation with no boilerplate.
CocktailApp - Cocktails Android App with Clean Architecture, MVVM , Retrofit, Coroutines, Navigation Components , Room, Dagger Hilt, Cache Strategy and Coroutines Flow
voyager - 🛸 A pragmatic navigation library for Jetpack Compose
compose-samples - Official Jetpack Compose samples.