Created
December 7, 2019 13:57
-
-
Save user-mw/153a885f201213866480124aa37328b8 to your computer and use it in GitHub Desktop.
ViewModelProviders method of() in 2018
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
public class ViewModelProviders { | |
public static ViewModelProvider of(// arguments) { | |
// Code | |
return new ViewModelProvider(fragment.getViewModelStore(), factory); | |
} | |
public static ViewModelProvider of(// arguments) { | |
// Code | |
return new ViewModelProvider(activity.getViewModelStore(), factory); | |
} | |
// Code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment