architecture-samples
architecture-samples copied to clipboard
A collection of samples to discuss and showcase different architectural tools and patterns for Android apps.
Line 201 in the TasksViewModel, viewModelScope.launch { result.value = filterItems(tasksResult.data, getSavedFilterType()) } Why google use coroutine??? what are the advantages or reasons??
Room dependencies are repeated: Removed the same
I was working on a project in which I started using viewmodel and livedata architecture components. I am not using data binding but simply accessing livedata in the activity. While...
In todo-mvvm-live-kotlin in Util/ViewExt.kt, in the callback of the showSnackbar function there gets the EspressoIdlingResource incremented and decremented. The problem is, that if onDismissed is called before onShown, the counter...
Remove the import: ```kotlin import javax.inject.Singleton ``` I believe the annotation was there for the ```ViewModelFactory.kt ``` and then removed due to similar issue in this link: https://github.com/google/dagger/issues/1607 https://github.com/google/dagger/issues/1607#issuecomment-582001712
In [app/src/mock/java/com/example/android/architecture/blueprints/todoapp/ServiceLocator.kt](https://github.com/googlesamples/android-architecture/blob/master/app/src/mock/java/com/example/android/architecture/blueprints/todoapp/ServiceLocator.kt),L43. Why repeat `tasksRepository ?:` in return? Can the return be simplified as `return tasksRepository ?: createTasksRepository(context)` ? ```kotlin fun provideTasksRepository(context: Context): TasksRepository { synchronized(this) { return tasksRepository ?:...
Using private constructor instead of public constructor is better for singleton pattern.
Hi @JoseAlcerreca I did some changes in branch dagger-android and I would like to know if it is possible contribute for your project. The main changes that I did were:...
In Dagger Android example, when changed the testOptions to use [Android Test Orchestrator](https://developer.android.com/training/testing/junit-runner) ``` testOptions{ execution 'ANDROIDX_TEST_ORCHESTRATOR' //
Is it possible to make ViewModelFactory singleton? Right now, every time you inject it new instance will be created.