Last active
March 16, 2020 16:13
-
-
Save Pluu/aa10e0b35556ce28a002629b6bb6c4ca 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( | |
requireActivity().getApplication(), | |
this, | |
getArguments()); // ◀ Fragmentに渡されたArgumentを代入 | |
} | |
return mDefaultFactory; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment