What is the appropriate replacement of deprecated getSupportLoaderManager()?
问题 I came to know that getSupportLoaderManager is deprecated. But I want to call: getSupportLoaderManager().initLoader(0, null, mRecipeLoaderManager); What should be an alternative to that call? Or can I still use getSupportLoaderManager without worrying? 回答1: As stated here: Loaders "Loaders have been deprecated as of Android P (API 28). The recommended option for dealing with loading data while handling the Activity and Fragment lifecycles is to use a combination of ViewModels and LiveData."