Last active
January 3, 2018 07:01
-
-
Save wightwulf1944/2d7053b1a06eb612272a3af0794c97c9 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
public class MasterActivity extends AppCompatActivity { | |
private MainViewModel viewModel; | |
@Override | |
protected void onCreate(@Nullable Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
viewModel = ViewModelProviders.of(this).get(MainViewModel.class); | |
viewModel.load(savedInstanceState); | |
} | |
@Override | |
protected void onSaveInstanceState(Bundle outState) { | |
super.onSaveInstanceState(outState); | |
viewModel.onSaveInstanceState(outState); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment