Skip to content

Instantly share code, notes, and snippets.

@v3n3
Created October 17, 2016 21:26
Show Gist options
  • Save v3n3/2483cc722ce4c800808b7122c1be3988 to your computer and use it in GitHub Desktop.
Save v3n3/2483cc722ce4c800808b7122c1be3988 to your computer and use it in GitHub Desktop.
public class MainActivity extends AppCompatActivity {
ActivityMainBinding binding;
MainViewModel viewModel;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
viewModel = new MainViewModel();
binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
binding.setModel(viewModel);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment