Skip to content

Instantly share code, notes, and snippets.

@hansenji
Last active April 1, 2019 03:46
Show Gist options
  • Save hansenji/dd30e6fbf03edf190eea55f566e827da to your computer and use it in GitHub Desktop.
Save hansenji/dd30e6fbf03edf190eea55f566e827da to your computer and use it in GitHub Desktop.
savedstate_boilerplate.kt
@AssistedInject.Factory
interface Factory : ViewModelAssistedFactory<MyViewModel>
@Module
abstract class DetailModule {
@Binds
@IntoMap
@ViewModelKey(MyViewModel.class)
abstract fun bindFactory(factory: MyViewModel.Factory): ViewModelAssistedFactory
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment