Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Building Coinverse's Android app

AdamHurwitz AdamSHurwitz

🚀
Building Coinverse's Android app
View GitHub Profile
@Zhuinden
Zhuinden / ApplicationComponent.kt
Last active Mar 14, 2021
Dagger + ViewModel + SavedStateHandle
View ApplicationComponent.kt
@Singleton
@Component(modules = [AssistedInjectionModule::class])
interface ApplicationComponent {
fun mySavedStateViewModelFactory(): MySavedStateViewModel.Factory
}
@kakai248
kakai248 / Example.kt
Created Feb 24, 2020
Example on how to to inject SavedStateHandle into ViewModel's
View Example.kt
// ViewModel factory
@MainThread
inline fun <reified VM : ViewModel> ComponentActivity.viewModel(
noinline provider: (SavedStateHandle) -> VM
) = createLazyViewModel(
viewModelClass = VM::class,
savedStateRegistryOwnerProducer = { this },
viewModelStoreOwnerProducer = { this },
viewModelProvider = provider
@cdmunoz
cdmunoz / cdmi_android.md
Last active Feb 12, 2020
Carlos Daniel Muñoz and Android Community
View cdmi_android.md

Community Impact: Carlos Daniel Munoz Idarraga

Summary

Impact Description Total
Direct Impact Meetups, confs and talks +1.1k
Indirect Impact Articles, Stack overflow +135k
People Trained Workshops +60
@CristinaSolana
CristinaSolana / gist:1885435
Created Feb 22, 2012
Keeping a fork up to date
View gist:1885435

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream