architecture-components-samples
architecture-components-samples copied to clipboard
Samples for Android Architecture Components.
I'm facing a problem adopting the mechanism of network bound resource. To explain my problem I'll take the UserRepository class that implements the network bound resource abstract class. I have...
Can't find data [L58](https://github.com/android/architecture-components-samples/blob/master/BasicSample/app/src/main/java/com/example/android/persistence/viewmodel/ProductListViewModel.java#L58) ``` mProducts = Transformations.switchMap( savedStateHandle.getLiveData("QUERY", null), (Function) query -> { if (TextUtils.isEmpty(query)) { return mRepository.getProducts(); } return mRepository.searchProducts("*" + query + "*"); }); ``` No data...
I have DashBoardViewModel which will provide the data of message,news,events etc for my DashBoardActivity.So is it appropraite to use MessageViewModel,NewsViewModel etc as a member of DashBoardViewModel. Is this approach bad...
We have an URI that has this format `com.example://changeForgottenPassword?token=XXXX`. The definition for the deep link is ``. After building the app the intent filter is added into the AndroidManifest and...
## Issue with the NavigationAdvancedSample? Sample Deeplink: www.example.com/user/Jo When the sample app opened with deeplink, on the second tab **reselect**, the second tab are not able to pop back to...
https://stackoverflow.com/questions/54616996/android-navigation-component-and-bottomnavigationview-in-a-multi-module-application I am facing extract same circumstance here... trying to create a multi-module application where every feature is a standalone library (module). Single activity pattern is applied throughout the project,...
The docs write about using setForegroundAsync, but the sample doesn't show it: https://developer.android.com/topic/libraries/architecture/workmanager/advanced/long-running Also, please show how to perform operations on the UI thread on the new CoroutineWorker. I don't...
Is it a correct pattern to use a same model for both Retrofit and Room library as it's done in GithubBrowserSample sample?
Performing AndroidSupportInjection.inject method in onCreate of Fragment Life Cycle can lead to inconsistencies when the fragment is reattached which leads to the issue in which androidInjector() in the fragment returns...
 As it mentioned above, ActivityTestRule is deprecated. Would you please provide a new AutoClearedValueTest by ActivityScenarioRule instead of ActivityTestRule? I had tried codes like these, but failed. ```kotlin @get:Rule...