Last active
March 16, 2020 16:13
-
-
Save Pluu/3d957092c9bf8d554ae02a3789d50c79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NonNull | |
@Override | |
public ViewModelProvider.Factory getDefaultViewModelProviderFactory() { | |
... | |
mDefaultFactory = new SavedStateViewModelFactory( | |
getApplication(), | |
this, | |
getIntent() != null ? getIntent().getExtras() : null); // ◀ Activityに渡されたArgumentを代入 | |
... | |
return mDefaultFactory; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment