Skip to content

Instantly share code, notes, and snippets.

@stfalconaleks
Created October 6, 2017 07:41
Show Gist options
  • Save stfalconaleks/2398095869f6a2e7fd3317879fd30910 to your computer and use it in GitHub Desktop.
Save stfalconaleks/2398095869f6a2e7fd3317879fd30910 to your computer and use it in GitHub Desktop.
private ProfileViewModel viewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityProfileBinding binding = DataBindingUtil.setContentView(this, LAYOUT_ACTIVITY);
viewModel = new ProfileViewModel(this);
binding.setViewModel(viewModel);
}
@Override
protected void onResume() {
super.onResume();
viewModel.onResume();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment